Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that will take the formula that that I have in cell B2 and I
need it to be able to do an autofill for me, any suggestions on how to accomplish this? So far I have the following code: Selection.AutoFill Destination:=Range("G2:G50") Range("G2:G50").Select Range("G2").Select I don't want it to always autofill to G50 if I can help it, any suggestions? Richard |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How would the code know how far down you want to fill ? You want to tell it,
or is there a pattern somewhere ? Best wishes Harald "Richard" <Richard @discussions.microsoft.com skrev i melding ... Selection.AutoFill Destination:=Range("G2:G50") I don't want it to always autofill to G50 if I can help it, any suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wasn't this answered in another thread very recently?
'br = Cells(Rows.Count, "b").End(xlUp).Row br=33 'or whatever number you like. See Dave's post Cells(1, "b").autofill Destination:=Range(Cells(1, "b"), Cells(br, "b")) -- Don Guillett SalesAid Software "Richard" <Richard @discussions.microsoft.com wrote in message ... I have a macro that will take the formula that that I have in cell B2 and I need it to be able to do an autofill for me, any suggestions on how to accomplish this? So far I have the following code: Selection.AutoFill Destination:=Range("G2:G50") Range("G2:G50").Select Range("G2").Select I don't want it to always autofill to G50 if I can help it, any suggestions? Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP!!! I need macro to autofill | Excel Discussion (Misc queries) | |||
Autofill in macro | Excel Discussion (Misc queries) | |||
AutoFill Macro | Excel Programming | |||
Autofill Macro | Excel Programming | |||
autofill macro | Excel Discussion (Misc queries) |