LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro for Fill Down where number of rows differs and without havingto hardcode column ranges

Hi all

I am sure there is a very quick answer to my problem but it is outside
my limited knowledge of Excel Macro's.

I have a sheet that I import data to. Data is imported into the range
starting in cell A4 and across to column AZ. The number of rows
differs depending upon each export, but can be up to 50,000+

In Column BA:DZ I have a heap of calculations. Row 3 stores the
calculations. I currently have a very messy macro that fills down for
each and every column individually (if I select them all at once excel
has a hisssy fit) down to row 60000

e.g.

Range("BA3:BA60000").Select
Selection.FillDown

I know I can find out what is the last row with End(xlUp) etc and I
know I can put that in a variable

e.g.
Range("BA3:BA" & Range("A65536").End(xlUp).Row).Select
' Selection.FillDown

(column A will always have data in it where the remainder of the row
contains at least some info)

But how do I make it 'neat' so that anytime I add additional columns I
don't have to add a new line to the macro

In effect I want to repeat the same filldown starting at Column BA and
going through to DZ (or further if I add extra calculations - Row 1
has column titles where there is a calculation otherwise they are
blank where there is no info and therefore no fill).

Clear as mud?

Any tips would be greatfully received as I fear my brain is turning
rapidly into an excel mush

Cheers

David
 
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
Fill Cells with same number in three rows then skip to next number Tracy Excel Worksheet Functions 2 November 7th 08 03:12 PM
Fill Down reference of even number rows jyorraku Excel Worksheet Functions 3 September 18th 08 12:48 AM
hardcode a column in a formula AHizon via OfficeKB.com Excel Worksheet Functions 2 October 16th 07 01:33 AM
Auto Fill Column with Date based on rows in other column JOUIOUI Excel Programming 2 June 6th 06 06:28 PM
Fill x number of rows with formula tourless Excel Programming 2 October 27th 05 05:11 PM


All times are GMT +1. The time now is 01:37 AM.

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

About Us

"It's about Microsoft Excel"