conditional formatting and comments

J

Jacob Skaria

Press F5>From Goto window select Comments (default)>OK will select all cells
with comments...Then apply conditional formatting.

If this post helps click Yes
 
P

puting_uwak

Jacob Skaria said:
Press F5>From Goto window select Comments (default)>OK will select all cells
with comments...Then apply conditional formatting.

If this post helps click Yes


thanks for replying jacob! what i was actually looking for is a formula
that i can enter in conditional formatting to automatically format cells that
have comments in them. for example, if insert a comment in a cell, the cell
will automatically be filled with blue. if i remove the comment, the cell's
fill color will be removed.
 
K

kiboy^palaboy

puting_uwak said:
can i apply conditional formatting only for cells that have comments?


i have a column of data and some of them had a comment,can i directly select
the column and apply conditional formatting for that data?
 
J

Jacob Skaria

Here we go...

You will have to use a UDF before trying the conditional formatting. If you
are new to macros set the security level to low/medium in
(Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11.
From menu 'Insert' a module and paste the below code. Save. Get back to
Workbook.

Function HasComment(varRange As Range) As Integer
If Not varRange.Comment Is Nothing Then HasComment = 1
End Function

Now select cell A1. From menu Format>Conditional Formatting>Select 'Formula
Is' and enter the below formula.
=hascomment(A1)=1
and select your color. It is blue right....

Try out and feeback...

If this post helps click Yes
 

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