Conditional Formatting

K

KimC

This might be very simple, but i cant for the life of me work out how to do it.

I have two columns
A B
1
2

I want to shade the corresponing cell if the other has something in it
(doesnt matter what it is - if could be different every time)

for example
A B
1 a value (shaded)
2 (shaded) a value

What coding do i need?
 
S

Sandy Mann

What do you want ot happen if both cells have a value?

If in that case no colour then in A1:

=AND(A1="",B1<>"")

and in B1:

=AND(B1="",A1<>"")

If you are trying to stop a entery in the second cell if there is already an
entry in the other one the try Data Validation:

=COUNTA(A1:B1)<2


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top