Conditional formatting depending on a cell comment using VBA in Microsoft Excel

Question:
How can I make a conditional formatting depending on a cell commentary?

Answer:
Insert the following code into the standard module Formula for conditioned formatting: =test(Data)=True

Function Test(rng As Range) As Boolean

 If rng.Comment.Text = "Test" Then Test = True Else Test = False End If End Function

Comments

  1. I am trying to write a macro to process the comments collection seaching for comments that have text formmatting applied? Ps. Using Win 2000 with Excel XP

  2. I am trying to write a macro to process the comments collection seaching for comments that have text formmatting applied? Ps. Using Win 2000 with Excel XP

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.