2 Conditional formats and insert comment - ajit

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
How can it be blank and be Sunday?

To test for Sunday, use a formula of

=WEEKDAY(A1)=1
 
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.
 
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
 
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
 
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)
 
Back
Top