Strike-through an entire row.

H

HoundofCullin

OK... I need to know if there is a way I can strike through the text on
a row by highlighting the row with the defunkt information and
activating a macro.

Let's see if I can give an example.


Say I'm entering data in, row by row... Each row's data is SIMILAR but
not the same.
Now let's say that apon review I notice that one of the row is
incorrect.
I need to be able to highlight the row (Presumably by selecting the
corresponding number on the left hand side {1,2,3 etc}) then I need to
run a macro (that will eventually be tied to a button) and then be done
the macro would turn the text .RED and then strike through the
information. Is that even possible? if so... can you help me?!


Thanks a ton, Josh
 
E

Earl Kiosterud

Josh,

You can select an entire row with Shift-Space too. The following code will
make the entire row red (that the cell pointer is in).

Sub RedStrike()
With Selection.EntireRow.Font
.Strikethrough = True
.ColorIndex = 3
End With
End Sub

I did this by recording a macro, then taking out a bunch of stuff and
tweaking it a bit. You may wish to assign a shortcut to run it quickly from
the keyboard. Tools - Macro - Macros. Select the macro, and click Options.
There's a place to put in a shortcut. I used Shift-R. It wound up
Ctrl-Shift-R. The Excel shortcuts don't use Shift, AFAIK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top