May 06 2020 07:59 AM
I'm not sure if it's possible and I don't have a screen shot (I'm on a computer that doesn't have excel atm) but I'll try my best to explain:
I have a formula in A1:
=B2
However, I only want A1 to equal B2 if B2 is shaded yellow.
Is this possible?
Thanks in advance!
May 06 2020 09:49 AM
SolutionYeah you can do it but you need to be tricky for this
First read this article https://excelsirji.com/vba-code-to-count-cells-by-color/
Use second code given on this link and then use if formula
Put the Yellow color on A2 (or anywhere just change the reference in below formula then) cell and enter this formula in A1
=if(CountByColor(B2,A2)>0,B2,0)
May 18 2020 09:10 PM
Thanks @jukapil great answer!
May 06 2020 09:49 AM
SolutionYeah you can do it but you need to be tricky for this
First read this article https://excelsirji.com/vba-code-to-count-cells-by-color/
Use second code given on this link and then use if formula
Put the Yellow color on A2 (or anywhere just change the reference in below formula then) cell and enter this formula in A1
=if(CountByColor(B2,A2)>0,B2,0)