#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filldown starting from F2 instead of F1 Ephraim Excel Worksheet Functions 5 April 15th 10 01:05 PM
Prevent filldown Dave Excel Discussion (Misc queries) 4 July 26th 08 04:59 AM
Macro filldown SJC Excel Worksheet Functions 0 June 12th 08 06:31 PM
FillDown Macro Nick Junod Excel Worksheet Functions 3 February 6th 06 10:10 PM
Macro Filldown Hirsch Excel Worksheet Functions 4 June 6th 05 06:25 PM


All times are GMT +1. The time now is 06:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"