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.
|