Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FillDown
What is happening with this code to FillDown a formula in one column to a
point where another column ends? Range("E1").Formula = MyFormula Range("E1", Range("A1").End(xlDown)).Offset(0, 1).FillDown Any data that may be in columns B:D are all changed to whatever is on row 1 of the column. Only column A will always be a complete list so that needs to be criteria for filling down. The code works great if the FillDown column is next to column A, but not if it points across other columns of data. How can I do this without re-arranging my data columns? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
FillDown
Sub tester1()
myFormula = "=sum(A1:D1)" Range("E1").Formula = myFormula Range("E1", Range("A1").End(xlDown).Offset(0, 4)).FillDown End Sub Will filldown column E. -- Regards, Tom Ogilvy "Mike Fogleman" wrote in message ... What is happening with this code to FillDown a formula in one column to a point where another column ends? Range("E1").Formula = MyFormula Range("E1", Range("A1").End(xlDown)).Offset(0, 1).FillDown Any data that may be in columns B:D are all changed to whatever is on row 1 of the column. Only column A will always be a complete list so that needs to be criteria for filling down. The code works great if the FillDown column is next to column A, but not if it points across other columns of data. How can I do this without re-arranging my data columns? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
FillDown
Duh! Change the Offset column number. Thanks, Tom, for the slap.
"Tom Ogilvy" wrote in message ... Sub tester1() myFormula = "=sum(A1:D1)" Range("E1").Formula = myFormula Range("E1", Range("A1").End(xlDown).Offset(0, 4)).FillDown End Sub Will filldown column E. -- Regards, Tom Ogilvy "Mike Fogleman" wrote in message ... What is happening with this code to FillDown a formula in one column to a point where another column ends? Range("E1").Formula = MyFormula Range("E1", Range("A1").End(xlDown)).Offset(0, 1).FillDown Any data that may be in columns B:D are all changed to whatever is on row 1 of the column. Only column A will always be a complete list so that needs to be criteria for filling down. The code works great if the FillDown column is next to column A, but not if it points across other columns of data. How can I do this without re-arranging my data columns? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filldown starting from F2 instead of F1 | Excel Worksheet Functions | |||
Prevent filldown | Excel Discussion (Misc queries) | |||
Macro filldown | Excel Worksheet Functions | |||
FillDown Macro | Excel Worksheet Functions | |||
Macro Filldown | Excel Worksheet Functions |