Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Autofill until last cell in a row

In vba how do I:

Change the contents of cell E1 and F1 to the number o (zero) and the
autofill the contents the the last cell in each row.


Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Autofill until last cell in a row

I used column A to find out the last used row.

Dim LastRow as long
with worksheets("Somesheetnamehere")
lastrow = .cells(.rows.count,"A").end(xlup).row

.range("e1:f" & lastrow).value = 0
end with

You can fill the whole range at once instead of using autofill.

Little Penny wrote:

In vba how do I:

Change the contents of cell E1 and F1 to the number o (zero) and the
autofill the contents the the last cell in each row.

Thanks


--

Dave Peterson
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
AutoFill a cell with a value N1KO Excel Discussion (Misc queries) 1 March 30th 09 11:45 AM
Autofill cell to right MMH Excel Programming 2 July 10th 05 11:52 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 according to cell index honour Excel Worksheet Functions 1 December 2nd 04 01:49 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


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