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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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