Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Program an autofill

I want to program an autofill to the end of the rows in a column, but
it won't be the same number of rows each time. When I double click on
the cell tail (small box in lower right corner of highlite cell box)
it fills to the end but in the program it records it to a certain row.
I need it to go to the bottom each time but that bottom will vary
each time.

I figured one way to do it is to have excel count the number of rows,
store it in a variable and fill to that row but I wanted an easier
way. Any suggestions?

Thank you in advance,
Pete K
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Program an autofill

There are many ways, but they all requiring finding the last filled row (you
have done that already and it appears you find that too cumbersome)

assume the fill is going to be in column D

Dim rng as Range
' get the range from column C
set rng = Range(cells(1,3),cells(1,3).End(xldown))
' go over one column
set rng = rng.offset(0,1)

now rng is the range you want to fill.

--
Regards,
Tom Ogilvy

"Pete K" wrote in message
om...
I want to program an autofill to the end of the rows in a column, but
it won't be the same number of rows each time. When I double click on
the cell tail (small box in lower right corner of highlite cell box)
it fills to the end but in the program it records it to a certain row.
I need it to go to the bottom each time but that bottom will vary
each time.

I figured one way to do it is to have excel count the number of rows,
store it in a variable and fill to that row but I wanted an easier
way. Any suggestions?

Thank you in advance,
Pete K



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Program an autofill

Thank you very much.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
Autofill Until uberathlete Excel Discussion (Misc queries) 1 November 10th 05 04:08 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Autofill Confused? Excel Worksheet Functions 1 March 24th 05 10:34 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 01:21 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"