+ Reply to Thread
Results 1 to 6 of 6

Macro to check cell color

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to check cell color

    I am trying to create a macro to check a range for cell color of red. If there is a red cell, to stop and display a msgbox stating they need to fill it in. If there is no red then it will go into a print function. I am relatively new to macros, so any advice or help is greatly appreciated!

    Jake

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Macro to check cell color

    hello

    try this
    Please Login or Register  to view this content.
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    06-09-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to check cell color

    hi i have some query on above , how to find which cell in selected range is red clour --- means result should be cell reference not message box ,,,
    please help

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Macro to check cell color

    second line after ' you have example of any other range. Sorry but I can't do more then everything ;-)
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-01-2012
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro to check cell color

    So the above worked exactly the way I wanted it to. Except for the fact that I still have red cells and it is functioning as if there wasn't. These boxes are conditionally formatted to red (I verified that they are truly red, 255,0,0 in the color scale) and it will not call them out. However, if I format a box with red fill it will call it out. Any thoughts or suggestions?

  6. #6
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Macro to check cell color

    @y2kohlhagen
    so you should replace Interior color index
    Please Login or Register  to view this content.
    with Interior color RGB value
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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