Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill down based on rows in region

Suppose data in A1:F1 and in A1:Asome number

I want to fill code starting in E2 down to Esomenumber.

Suppose the formula is "=MyCode"

How do I go about doing that, given the number of rows may vary and I
want the code to adapt to the number of rows?

TIA
Ron



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Fill down based on rows in region

Ron

Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
Range("E2:E" & LastRow).Formula = "=MyCode"

Regards

Trevor


"ronber" wrote in message
...
Suppose data in A1:F1 and in A1:Asome number

I want to fill code starting in E2 down to Esomenumber.

Suppose the formula is "=MyCode"

How do I go about doing that, given the number of rows may vary and I
want the code to adapt to the number of rows?

TIA
Ron



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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
Auto fill text columns based on rows Cecilia Excel Worksheet Functions 3 March 29th 10 10:51 PM
Paste values all cells in a region which refers to out of region Vijay Excel Worksheet Functions 0 August 25th 09 06:03 AM
Fill cell based on # of days spezticle Excel Worksheet Functions 3 September 22nd 08 05:00 PM
auto fill rows with months based on cell value Drew[_2_] Excel Discussion (Misc queries) 5 March 31st 08 08:40 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM


All times are GMT +1. The time now is 09:26 AM.

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"