Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Macro to select last row

Try this one liner

Range("I2:I" & Cells(Rows.Count, _
"A").End(xlUp).Row).Formula = Range("I2").Formula

OR

Sheets("Sheetname").Range("I2:I" & Cells(Rows.Count, _
"A").End(xlUp).Row).Formula = Range("I2").Formula


--
Jacob (MVP - Excel)


"msnyc07" wrote:

I am trying to automate putting a sheet value into Row I. My manual method
is to paste the formula in I2 (since values begin on Row 2), then go to A2,
Ctrl Down until I hit the last record (there are cases where there are blanks
so sometimes I need to do this a few times) and when I reach it tab back over
to the same row in I and Ctrl-Shift Arrow Up and then Fill Down.

Somehow this doesn't work very well when recorded as a macro, any
suggestions appreciated.

In my ideal world in fact once this script worked for a page I'd have a VBA
script that would step through each page and apply the function and voila!

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
Macro - select puiuluipui Excel Discussion (Misc queries) 4 May 19th 10 09:44 AM
Select range in macro Chris Excel Discussion (Misc queries) 1 February 19th 10 01:33 PM
can't select a macro Donna[_2_] Excel Discussion (Misc queries) 0 May 15th 09 02:55 AM
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
select a range in a macro Andrew Excel Discussion (Misc queries) 3 May 10th 06 08:45 PM


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