Results 1 to 6 of 6

VBA and Conditional Formatting to fill cells with X colour if they contain a comment

Threaded View

  1. #1
    Registered User
    Join Date
    02-13-2021
    Location
    ottawa
    MS-Off Ver
    2017
    Posts
    10

    VBA and Conditional Formatting to fill cells with X colour if they contain a comment

    What I'm trying to do is colour / fill a cell with a colour if that cell has a comment.

    I'm taking inspiration from this post here:

    <I'm not allowed to post links until I post few times>


    What I'm trying is insert this code into vba

    Function IsComm(CellComm As Range) As Boolean
    Application.Volatile
    IsComm = False
    If Not CellComm.Comment Is Nothing Then IsComm = True
    End Function

    So what I've done is:
    1. hit ALT+F11
    2. right-click in the VBA project window
    3. click insert module
    4. copy and paste the code above
    5. and then click save and save the excel worksheet with macros enabled

    I then add conditional formating logic by:
    1. clicking home
    2. clicking conditional formating
    3. clicking new rule
    4. use formula to determine which cells to format
    5. type exactly this "=IsComm(A1)" without quotes in the "format value where this formula is true" box.
    6. select the colour green from the format button and fill tab.

    below are some pictures of me suffering:
    Attached Images Attached Images
    Last edited by skite0; 02-15-2021 at 05:42 AM. Reason: solution was found

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Using conditional formatting to fill a cell colour based upon 1 of 2 conditions
    By oneeasygeezer in forum Outlook Formatting & Functions
    Replies: 3
    Last Post: 09-05-2018, 02:39 PM
  2. Conditional Formatting - changing cell fill colour
    By Chamuit in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-05-2017, 03:03 PM
  3. conditional formatting fill cells based on text, how to find sum based on CF colour
    By tubbybear in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-27-2016, 12:04 PM
  4. Conditional formatting - Fill colour and dates
    By JTBS in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-07-2016, 04:47 AM
  5. [SOLVED] Conditional formatting - colour fill entire row by date range
    By oOLILYOo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2012, 10:31 AM
  6. [SOLVED] VBA for conditional formatting colour fill (15 colours) in 2003
    By Russell Dawson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2012, 03:18 PM
  7. Conditional Formatting Fill colour with weekday colour
    By nattasiray in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2008, 06:49 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1