Conditional Formatting Fill Color But Don't Change Font Color

jock444

New Member
Joined
Feb 13, 2019
Messages
9
Hi, I've got a combo box with 4 options that change the font color of a range of cells (to red, blue , green, or black) using conditional formatting. I want another option to add a yellow fill color to the same cells but I don't want the existing font color to change. In conditional formatting it seems you have to choose a font color as well as a fill color which is no good for me as I want to leave the text as it is. What would be the best way to solve this? I'm a bit of a novice so any help would be greatly appreciated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
As you say font colour needs to be specifed as well.

At a guess I would say VBA would be your only option though I'm no expert in VBA.
 
Upvote 0
I'm now using a macro for fill color but it still wants to change the text color back to black instead of leaving the text as it is :(. Hoping someone can help me with this code:

Code:
Private Sub ComboBox1_Change()
    If ComboBox1.Value = "Blue Color" Then
          Range ("A1").Interior.Color = RGB(83, 141, 213)
    End If
End Sub

Is there some code I can add in to keep current font color (or add it back in after applying the fill color)?
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top