2 Conditional formats and insert comment - ajit

G

Guest

1. I want to format the cell by 2 conditions. e.g. in range a1:z1, fill the
cell with
red colour(Fill colour) only if it is blank and if it contains "Sunday",
show it with red colour (Font Colour). HOw can I do this?
2. I want to insert the comment conditionally e.g. if the cell contains
"IT" insert the comment "India Today", "TOI" insert comment as "Times of
India" etc. How Can I
perform this operation?

Ajit
 
M

Mangesh Yadav

1. I want to format the cell by 2 conditions. e.g. in range a1:z1, fill the
cell with
red colour(Fill colour) only if it is blank and if it contains "Sunday",
show it with red colour (Font Colour). HOw can I do this?

Select the entire range A1:Z1. Go to Format > Conditional Formatting. select
for cell value is "equal to" and enter "" (which means blank). Click on
Format button, Paterns tab, and select red color. Click Ok.

Now, click on Add, and repeat the above process. This time instead of "",
enter "Sunday", format button, font tab, and select red. Ok.

2. I want to insert the comment conditionally e.g. if the cell contains
"IT" insert the comment "India Today", "TOI" insert comment as "Times of
India" etc. How Can I
perform this operation?

for this, you would require a macro.

Mangesh
 
B

Bob Phillips

How can it be blank and be Sunday?

To test for Sunday, use a formula of

=WEEKDAY(A1)=1
 
G

Guest

I have the same problem. I want blank cells to be flagged with as red.
However, I did as you suggested and it did not work. I have verified the
cell is truly empty. Is there some special trick to keying the double
quotes? I've tried " ", "", ="", 4 single quotes, all to no avail.
 
M

Mangesh Yadav

Hi KarenF

I have tested the solution and it works fine. But you have to take care and
go back and see the conditions again especially when you use text (strings)
where you need to enter double quotes ("). When you enter your condition the
first time, say for testing a blank, you would enter "". This changes to
"""""" or something like this. You need to go back and change it to "".
Similarly for "Sunday", just check if it displays this with 2 " only.

So just go back to the conditional format and check if your blank is ="", if
not, make it that way.

Mangesh
 
G

Guest

That did the trick! Thank you Mangesh...

Mangesh Yadav said:
Hi KarenF

I have tested the solution and it works fine. But you have to take care and
go back and see the conditions again especially when you use text (strings)
where you need to enter double quotes ("). When you enter your condition the
first time, say for testing a blank, you would enter "". This changes to
"""""" or something like this. You need to go back and change it to "".
Similarly for "Sunday", just check if it displays this with 2 " only.

So just go back to the conditional format and check if your blank is ="", if
not, make it that way.

Mangesh
 
P

Peo Sjoblom

If you use formula is instead you won't have that problem

--
Regards,

Peo Sjoblom

(No private emails please)



--
Regards,

Peo Sjoblom

(No private emails please)
 

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