LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Select all rows on a sheet from a fixed starting point

Hello,

I'm trying to throw a macro together that will do some recurring formatting
for me.
I need to select a specific row to grab its formatting, then select a
starting row (fixed) and an end row (flexible) and apply the formatting to
that selection.
Afterwards, I want to select another row (fixed) and take its formatting,
and apply that to all the rows in the previous range that fulfill a certain
condition, in this case, contain a certain letter.

I started with the macro recorder for the first part of this task, and it
came up with the following (I removed all the scroll commands):

Rows("4:4").Select
Application.CutCopyMode = False
Selection.Copy
Rows("5:5").Select
Rows("5:190").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

So instead of Rows("5:190").Select, I'd like
Rows("5:last.row.with.a.value").Select.

How can that be done?

Thank you.
 
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
calculating a date using the day of the week as a starting point? Simon Excel Worksheet Functions 2 July 12th 06 02:32 PM
when adding new rows starting point of the formula doesn't update Debbie Excel Discussion (Misc queries) 1 April 21st 06 07:15 PM
bar chart starting point lnoles Charts and Charting in Excel 1 October 14th 05 02:16 PM
fixed Rows at top of sheet [email protected] New Users to Excel 3 August 26th 05 08:55 PM
Bar charts with a differing starting point Teng Charts and Charting in Excel 2 April 23rd 05 03:19 AM


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