What is the shortcut to turn cell red?

  • Thread starter Thread starter Vic
  • Start date Start date
V

Vic

I need a shortcut to turn one cell red. I need my client to click on a cell
then click on something else (shortcut) and the cell will turn red. How can I
do this?
 
Hi,
if you want to turn the cell red press the ribbon button ,
Home, Font, where there is a phone with a color underline, you can choose it
to red
 
Hi Eduardo, you did not understand my request. I need my client to click on a
problem cell then on some F-key (or some other shortcut) and this should turn
the cell red. If there is no shortcut then I need a macro to do this.
 
Hi Vic,
open VBA and paste this code

Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+r
'
With Selection.Font
.Color = -16776961
.TintAndShade = 0
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub

then you can assign a CTRL key,
to do that go to macros the macro name will be highlighted, Options, enter
the letter you would like to be press and that's it, when you select a cell
and press

CTRL + the letter you have choosen the cell will become red
 
Hi Eduardo,
This macro works except that it does not highlight the cell red. Instead it
makes font to be red. How can I highlight the cell?
Thanks.
 
Hi,
try

Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+r
'
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
 
Hi Eduardo,
I have managed to change the macro like this to make it work:

Sub TurnRed()
'
' TurnRed Macro
'
' Keyboard Shortcut: Ctrl+r
'
With Selection.Interior
.ColorIndex = 3
.TintAndShade = 0
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
 
Eduardo's macro turns both font and background red.

Perhaps you have some Conditional Formatting that overrides the red
background?


Gord Dibben MS Excel MVP
 
Hi,
Glad you got it, have a good day

Vic said:
Hi Eduardo,
I have managed to change the macro like this to make it work:

Sub TurnRed()
'
' TurnRed Macro
'
' Keyboard Shortcut: Ctrl+r
'
With Selection.Interior
.ColorIndex = 3
.TintAndShade = 0
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
 
Back
Top