Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Autofill across columns

set rng = Activesheet.UsedRange
lastCol = rng.columns(rng.columns.count).Column
Range(C21,Cells(21,lastcol)).Formula = Range("B21").formula

--
Regards,
Tom Ogilvy

"Willy" wrote in message
...
Hello All!
I'm looking for the code that would allow me to autofill a formula from

the first column all the way to the last column.
The number of columns in the sheet changes every time. I will be placing

the formula in cell B21, and I want to
autofill it across to the last column. Any help would be greatly

apprieciated. Thanks in advance for your time and help!
Willy



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 with different Columns rockytopfan4ever Excel Discussion (Misc queries) 0 July 30th 08 05:56 PM
Autofill columns relo Excel Worksheet Functions 3 July 3rd 07 10:56 PM
Autofill counting up Columns and Rows! fantomet Excel Worksheet Functions 5 December 14th 06 12:57 PM
autofill information from rows to columns without using transpose Rayce Excel Discussion (Misc queries) 1 September 4th 05 01:44 AM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM


All times are GMT +1. The time now is 04:49 AM.

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"