PC Review


Reply
Thread Tools Rate Thread

Autofill until last cell in a row

 
 
Little Penny
Guest
Posts: n/a
 
      3rd Dec 2007
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

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Dec 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Autofill of Cell based on contents in non adjacent cell Judy Cohen Microsoft Excel Programming 0 31st Mar 2010 01:27 PM
AutoFill a cell with a value N1KO Microsoft Excel Misc 1 30th Mar 2009 11:45 AM
Autofill cell to right =?Utf-8?B?TU1I?= Microsoft Excel Programming 2 10th Jul 2005 11:52 PM
Can a cell autofill with color in response to cell value? Gregory Microsoft Excel Misc 1 23rd Nov 2004 02:45 AM
Autofill months in cell paradise Microsoft Excel Programming 1 24th Nov 2003 04:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 AM.