PC Review


Reply
Thread Tools Rate Thread

Conditional fomatting for cells containing a Comment

 
 
Colin Hayes
Guest
Posts: n/a
 
      30th Apr 2011

Hi all

Can someone advise how to using conditional formatting on cells
containing a Comment?

I'd be hoping to have some method of identifying these cells and then
applying a colour or border format to make it more visible and obvious
that they contain a comment. I'm finding the small red triangle a little
hard to spot sometimes.


Grateful for any help.
 
Reply With Quote
 
 
 
 
isabelle
Guest
Posts: n/a
 
      30th Apr 2011
hi,

there's no formula to verify that cell contain a comment, but you can create one, and use it in conditional formatting

=NOT(ISERROR(HasComment(A1)))


Function HasComment(rng As Range) As Boolean
If Not IsError(rng.Comment.Text) Then HasComment = True
End Function

or in another way, just execute this macro

Sub MyCommentsMoreVisible()
With Cells.SpecialCells(xlCellTypeComments)
.Interior.ColorIndex = 33
End With
End Sub


--
isabelle

Le 2011-04-29 19:09, Colin Hayes a écrit :
> Can someone advise how to using conditional formatting on cells containing a Comment?

 
Reply With Quote
 
Colin Hayes
Guest
Posts: n/a
 
      30th Apr 2011
In article <ipfolc$n40$(E-Mail Removed)>, isabelle <(E-Mail Removed)> writes
>hi,
>
>there's no formula to verify that cell contain a comment, but you can create one,
>and use it in conditional formatting
>
> =NOT(ISERROR(HasComment(A1)))
>
>
>Function HasComment(rng As Range) As Boolean
>If Not IsError(rng.Comment.Text) Then HasComment = True
>End Function


Hi

Thanks Isabelle.

I know where to put the first formula for the conditional formatting
element , but I'm not sure how or where to put the Function code.

Could you advise?

Thanks


>
>or in another way, just execute this macro
>
>Sub MyCommentsMoreVisible()
>With Cells.SpecialCells(xlCellTypeComments)
> .Interior.ColorIndex = 33
>End With
>End Sub
>
>



 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      30th Apr 2011
hi,

sorry Colin, forget the formula, it's a bad idea, because there's no recalculation even adding Application.Volatile
but you can execute the macro


--
isabelle

Le 2011-04-29 21:34, Colin Hayes a écrit :

> I know where to put the first formula for the conditional formatting element , but I'm not sure how or where to put the Function code.
>
> Could you advise?
>
> Thanks

 
Reply With Quote
 
Colin Hayes
Guest
Posts: n/a
 
      30th Apr 2011
In article <ipfpmj$n40$(E-Mail Removed)>, isabelle <(E-Mail Removed)> writes
>hi,
>
>sorry Colin, forget the formula, it's a bad idea, because there's no recalculation
>even adding Application.Volatile
>but you can execute the macro
>
>


Hi Isabelle

OK Thank you.

Could an extra line be added to the macro to return the cells to white
if the comment is deleted?

Thanks again.
 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      30th Apr 2011
hi,

no, because problem is that adding or suppressing comments doesn't cause any events,
so there's isn't exist way to detect this changes.


--
isabelle

Le 2011-04-29 22:10, Colin Hayes a écrit :
> In article <ipfpmj$n40$(E-Mail Removed)>, isabelle <(E-Mail Removed)> writes
>> hi,
>>
>> sorry Colin, forget the formula, it's a bad idea, because there's no recalculation
>> even adding Application.Volatile
>> but you can execute the macro
>>
>>

>
> Hi Isabelle
>
> OK Thank you.
>
> Could an extra line be added to the macro to return the cells to white if the comment is deleted?
>
> Thanks again.

 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      30th Apr 2011
You must run the macro manually,
to return the cells to white, see Run's answer

--
isabelle

Le 2011-04-29 22:44, isabelle a écrit :
> hi,
>
> no, because problem is that adding or suppressing comments doesn't cause any events,
> so there's isn't exist way to detect this changes.
>
>

 
Reply With Quote
 
Ram
Guest
Posts: n/a
 
      1st May 2011
On Apr 30, 6:49*am, isabelle <i...@v.org> wrote:
> You must run the macro manually,
> to return the cells to white, see Run's answer
>
> --
> isabelle
>
> Le 2011-04-29 22:44, isabelle a écrit :
>
>
>
>
>
>
>
> > hi,

>
> > no, because problem is that adding or suppressing comments doesn't cause any events,
> > so there's isn't exist way to detect this changes.


hi
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional fomatting =?Utf-8?B?Sm9jayBX?= Microsoft Excel Worksheet Functions 7 28th Mar 2006 12:44 PM
Conditional fomatting jeff Microsoft Excel Misc 0 22nd Sep 2004 10:03 PM
Conditional fomatting =?Utf-8?B?TW9vc2U=?= Microsoft Excel Misc 0 22nd Sep 2004 09:35 PM
Conditional fomatting Sinfante Microsoft Excel Misc 3 1st Aug 2004 02:57 AM
Conditional Fomatting (Repost) James Microsoft Access Forms 4 20th Apr 2004 08:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.