I knew of the shift + space bar, but I wanted to know if there was way to
change the color of the cell, and row (i.e. yellow or green) by some key
combination.
Not quite what I was looking for but I have seen this add in, it is very cool
but it does make the undo option unavailable.
The shift + spacebar I already knew, but I was looking for a shortcut to
change the color of the cell and row (i.e. yellow or green). I just don't
like to use the mouse to much.
I use the following macro to highlight the current selection. It cycles
between 4 highlight colors as well as no highlight. You can easily change the
colorindex values to suit your preferences, but unfortunately the macro does
clear the Undo stack. I have the macro bound to the Ctrl^Shift^H key
combination so I can easliy select a highlight color by repeatedly pressing
this combination.
To highlight the entire row you could press Shift^Space then Ctrl^Shift^H,
or you could modify the code to use the expression "With
Selection.EntireRow.Interior" instead of "With Selection.Interior"
Hope that helps,
TK
Code follows:
Sub Highlight()
Dim color As Variant
With Selection.Interior
Select Case .ColorIndex
Case xlNone
.ColorIndex = 6
Case 6
.ColorIndex = 3
Case 3
.ColorIndex = 5
Case 5
.ColorIndex = 37
Case Else
.ColorIndex = xlNone
End Select
End With
End Sub
Works Great, I love it. This will work great as i go through a worksheet and
just new to highlight rows at random.
Thanks.
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.