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: 89
Default AutoFill down a certain number of rows

What code is there to specifically filldown a certain (or varied
number of rows)?

I create a Pivot Table of data and refresh this each month, I wish to
take the number of rows found within the Pivot Table and using that
count, fill down onto the bottom of a list of numbers in another
colum.

So presume the Pivot table is in columns F and G.

I have data in columns A and B and wish to add onto the bottom of both
of these columns a bunch of 9's (for Navision). The amount of rows I
need to have as 9s is the same as the number in the Pivot Table.

How do I do it? I have the following code already:

Dim StartCell, EndCell As Range
Set StartCell = Range("G4") 'Pivot
Set EndCell = Cells(Rows.Count, "G").End(xlUp).Offset(-1, 0) 'End of
Pivot excluding Grand Total
Range(StartCell9, EndCell9).Copy

I wish to now add the count of this range onto the bottom of cols A
and B. I thought of using E.g. Range("A50000").End.(xlUp)

then somehow using Selection.FillDown (having inserted 99999999).

Thanks for your help
 
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
Autofill to Last Row but Miss Some Rows? Dave Excel Discussion (Misc queries) 1 July 29th 08 02:13 PM
A number autofill !! pano Excel Worksheet Functions 4 February 5th 07 03:43 AM
AutoFill down X number of rows. Paul987 Excel Discussion (Misc queries) 2 April 24th 06 06:36 PM
AutoFill over 30,000 rows Cathy Excel Worksheet Functions 4 January 31st 06 10:22 PM
autofill same number to end of file enelson6 Excel Programming 1 December 8th 04 01:09 AM


All times are GMT +1. The time now is 10:32 PM.

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"