Guys, sorry for the double post, but this is a follow up to my question here:
http://www.mrexcel.com/forum/showthread.php?t=557005
That seems to have got lost in the stream.
As a recap:
I am using the following line of code to populate a series of formulas accross a row:
and the function:
My code works fine, but now I need to autofill the formulas down to the last row, again using the variables for the column index
LRow is as follows
and normally I would use the code:
to fill the formula from B3 down to the last row. However, I can not figure out how to insert the column variables into the above code.
My getrange function return the whole cell, for instance B3, which works fine for replacing everything but "B3:B"
Any ideas how i can get around this? Last question for the day I promise
Cheers all
http://www.mrexcel.com/forum/showthread.php?t=557005
That seems to have got lost in the stream.
As a recap:
I am using the following line of code to populate a series of formulas accross a row:
Code:
Sheets("CriticalOTPressures").Cells(3, TpAP).Formula = "=AllOTCalc!" & GetRange(FtV, 2) & ""
and the function:
Code:
Public Function GetRange(intColumn As Integer, intRow As Integer) As String
GetRange = Replace(Replace(Cells(intRow, intColumn).Address, "$", ""), ":", "")
End Function
My code works fine, but now I need to autofill the formulas down to the last row, again using the variables for the column index
LRow is as follows
Code:
LRow = Range("A" & Rows.Count).End(xlUp).Row
and normally I would use the code:
Code:
Range("B3").AutoFill Destination:=Range("B3:B" & LRow), Type:=xlFillDefault
to fill the formula from B3 down to the last row. However, I can not figure out how to insert the column variables into the above code.
My getrange function return the whole cell, for instance B3, which works fine for replacing everything but "B3:B"
Any ideas how i can get around this? Last question for the day I promise
Cheers all