Forum Discussion
Xilli620
Dec 26, 2021Copper Contributor
How do I use the background color of a cell as an argument in a function.
I need to get an "OK" if the background color in a cell is green or a "NO" if not. Something like: IF('Background Color in cell V3=green'; "OK"; "NO") How do I do that correctly in Excel.
Xilli620
Dec 26, 2021Copper Contributor
Thank you very much. Then I will not struggle with formulae in Excel further. 🙂 I'll check out VBA and learn.
Merry Christmas and Happy New Year
mtarler
Dec 27, 2021Silver Contributor
May I ask how the cell is getting that color? If it is getting a color through conditional formatting then the same condition/formula used to get the color can be used. If it is based on manual entry (i.e. someone manually sets the color) then I suggest you change the set up so they enter a value instead (maybe using 'helper' cells/columns). The color can then automatically use those manual entries to create the colors AND you can use those entries in your formulas.
- Xilli620Dec 27, 2021Copper ContributorHey m tarler
I set the colors manually. Green for bill payed and red for not payed. I have a page where I type in ID for tenant, and then I would like a list of OK for paid rent and NO for unpaid.
I'll take a look as soon as I can. thank you.- PeterBartholomew1Dec 27, 2021Silver Contributor
Excluding VBA for the moment the minimum typing can be achieved with 0 (unpaid) or 1 (paid). The values can be presented as text by number formatting and the cell colour changed using conditional formatting If preferred, status can be selected from a dropdown.
Using VBA, event handlers could toggle the settings of selected cells.
- Xilli620Dec 28, 2021Copper ContributorTo Peter Bartholomew
This sounds right. I'll try it very soon. Thank you.