Hi,
It would be far simpler to drag your formula manually but if you must have
VBA then try this:-
Sub stantiate()
Worksheets("Sheet1").Range("A1").Select
ActiveCell.FormulaR1C1 = "=IF(PAWY_INPUT!R[5]C7="""","""",PAWY_INPUT!R[5]C7)"
Selection.AutoFill Destination:=Range("A1:A50"), Type:=xlFillDefault
Range("A1").Select
End Sub
Mike
Further Requirement: When the VB is run cell A2 to have
=IF(PAWY_INPUT!$G
D/MIKE
Thnks ur sugestion. Pls see my code below and sugest for line 20 how
to make it fill so that each cell increases by the next cell row
number like $g$8, $g$9, $g$10 and so on.
Sub stantiate()
'Worksheets("54B").Range("AB15").Select
Selection.Copy
Worksheets("54B").Range("B15").Select
ActiveSheet.Paste
'ActiveCell.FormulaR1C1 = "=IF(PAWY_INPUT!R[5]C7="""","""",PAWY_INPUT!
R[5]C7)"
20 Selection.AutoFill Destination:=Range("B15:B30"),
Type:=xlFillDefault
Range("A1").Select
End Sub
Actual need is I have say A1.N1 which has in some cells absolute
reference, some relative and some cells with formulas.
So i want to use range A1.N1.select and copy it to next 50 rows, so
that the copied cells has the same as A1.N1. Like if it is absolute $g
$8 the cell below to have it as $g$9; in the next column if it is
M5+N5 then cell below should be M6+N6.
Pls sugest. I wl keep checking for ur response.
rgds/captgnvr