• Using cell color as a basis for an "if" function

    From Leah Swett@21:1/5 to All on Tue Jan 17 09:24:53 2023
    I'm trying to run a report based on the fill color of certain cells. I need to have a cell return a 100% if green and a 0% if red. I can't use the contents of the cells since those change based on the quarterly reports.

    Is there a way to use the cell color as a condition for an IF statement?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philip Herlihy@21:1/5 to All on Wed Jan 18 11:55:23 2023
    In article <[email protected]>, Leah Swett wrote...

    I'm trying to run a report based on the fill color of certain cells. I need to have a cell return a 100% if green and a 0% if red. I can't use the contents of the cells since those change based on the quarterly reports.

    Is there a way to use the cell color as a condition for an IF statement?

    Try this:

    https://professor-excel.com/how-to-return-the-background-color-code-from-excel- cell/

    (VBA is easier than it looks. Fool around with the Macro Recorder and examine what it generates.)

    --

    Phil, London

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)