Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Change the font color of a cell if other cells are not empty

Writer Matthew Barrera

How can I write the following code expression in Excel? What I want is to be able to change the font color of a cell if other cells are not empty.

Expression:

if cell A1, A2 & A3 are not empty change the font color of Cell B1

I tried...

=IF(A1:A3 <> "", B1.Font.Color = vbRed)

...but it doesn't work, all I see is #NAME?

Again, what I want is to change the font color of a cell based on the state of other cells.

3

1 Answer

B2.Font.Color = vbRed is not a value the cell can return, it is VBA code that can't be used in a formula.

In this case, you will want to use conditional formatting.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy