VBA change font color to cell fill color

lbrockmeier

New Member
Joined
Dec 18, 2017
Messages
7
Hi there,

I want to leverage different filter buttons, but need font color to change when I do that. Columns I and J have the reatilers and metrics in each row, but they are not visible as the font color is the same as the background color. but when I click on the "Discount Rate" filter button, as an example, the name of the retailer (row 15) dissappears as only rows that contain "Discount Rate" (e.g. 17-19) show up.

I need the macro to do 3 things with font:
1) Make text that is currently background color be visible based on filter
2) when filters are cleared, return the font colors to its original position (so a macro that returns font color to the background color). I was toying around with RBG and have those values and created a macro that way, but figured there had to be an easier way.

Let me know!

Thanks in advance.

1664980716046.png
 

Attachments

  • 1664980637213.png
    1664980637213.png
    40.1 KB · Views: 18

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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