cortiz1bog
09-06-2005, 09:34 PM
I have a very heavy workbook fill with formulas, since I started to know about VBA, I notice that I can write the formula while recording the macro and then have the code do the work without leaving the formula in cell, all I need in the cell is the actual value but not the formula, which is why the workbook is so heavy.
Since I am new at it, I make a test with the following code, which need lots of improvement as an example, can somebody give an idea how to improve the code, I know I am repeating myself in the code, but have no idea how else to do it...
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC3>=INFORME!R2C3,RC3<=INFORME!R2C6),R2C2,""NO"")"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub
I have made some user-forms for the user to input the data:
should the above code for the formulas, go together with the code for the user-form?
Need some direction as to how to put it all together
The objective is to input data into different sheets via user-forms and have a code for the actual formulas, but without leaving the formulas on the sheets. In which order and how o tie everything together?
Thanks
Cesar
Since I am new at it, I make a test with the following code, which need lots of improvement as an example, can somebody give an idea how to improve the code, I know I am repeating myself in the code, but have no idea how else to do it...
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC3>=INFORME!R2C3,RC3<=INFORME!R2C6),R2C2,""NO"")"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub
I have made some user-forms for the user to input the data:
should the above code for the formulas, go together with the code for the user-form?
Need some direction as to how to put it all together
The objective is to input data into different sheets via user-forms and have a code for the actual formulas, but without leaving the formulas on the sheets. In which order and how o tie everything together?
Thanks
Cesar