Copying Formulas Down Rows
Try adding CALCULATE to your code.
"J" wrote:
Hi there, I'm new to this group but I have a problem with Excel. Here
is the code I am using.
Sub AutoFillEquation()
Range("R4:AI4").AutoFill Destination:= _
Range("R4:AI" & Range("A" & Rows.Count).End(xlUp).Row), _
Type:=xlFillDefault
End Sub
The problem is that it does fill down the equations but they are not
calculating the values in the cells. It seems as if the values of the
first row are simply being pasted to the end (eventhough when I click
on the cell it displays the correct equation.
For example, in cell R9 there is the equation =I9+J9. The values in I9
and J9 are 5 and 7, respectively. However the answer in I9, as well as
every other value in column I, is 537 (the correct value for row 1 in
that column. When I retype the equation and hit enter it does work
however, but the macro is not working correctly. The reason I need the
macro is due to the changing number of rows and the file could get very
large otherwise.
Thanks for the help
Justin
|