+ Reply to Thread
Results 1 to 8 of 8

Macro Code To Paint The Cells Depended on Results

  1. #1
    Registered User
    Join Date
    03-21-2022
    Location
    Yerevan, Armenia
    MS-Off Ver
    MS Office 2019
    Posts
    12

    Macro Code To Paint The Cells Depended on Results

    Hi everyone,

    I need a macro code that will paint the cells as follow: if it sees "normal" in the cell - paint it green, "issue" - paint it red, "info" - paint it blue. Thanks in advance!!
    Last edited by grubenyan; 05-04-2022 at 07:25 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Macro Code To Paint The Cells Depended on Results

    Why do you want to use VBA for this? I would recommend conditional formatting. See image and attached file.

    Capture.JPG
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-21-2022
    Location
    Yerevan, Armenia
    MS-Off Ver
    MS Office 2019
    Posts
    12

    Re: Macro Code To Paint The Cells Depended on Results

    I need to automatically have these colors whenever I my function returns these words (info, normal, issue)

  4. #4
    Valued Forum Contributor
    Join Date
    10-12-2021
    Location
    CT
    MS-Off Ver
    365
    Posts
    462

    Re: Macro Code To Paint The Cells Depended on Results

    6stringjazzers suggestion will accomplish exactly that.

  5. #5
    Registered User
    Join Date
    03-21-2022
    Location
    Yerevan, Armenia
    MS-Off Ver
    MS Office 2019
    Posts
    12

    Re: Macro Code To Paint The Cells Depended on Results

    Thank you, guys

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Macro Code To Paint The Cells Depended on Results

    If you attach your file, I can update your actual file to show you how it works. See yellow banner at the top of the page.

  7. #7
    Registered User
    Join Date
    03-21-2022
    Location
    Yerevan, Armenia
    MS-Off Ver
    MS Office 2019
    Posts
    12

    Re: Macro Code To Paint The Cells Depended on Results

    Thank you so much. I did that yesterday according to your attachments.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Macro Code To Paint The Cells Depended on Results

    There is no file attached to any of your posts in this thread.

    The paper clip icon does not work for attachments. To attach a file:

    1. Under the text box where you type your reply click the Go Advanced button.
    2. On the next screen scroll down and under the Attachments section click the Manage Attachments link, which will show a pop-up window.
    3. Click the Choose File button to select a file to attached.
    4. Click the Upload button to upload the file.
    5. Then click the Close This Window button. Your file is now attached to your post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 01-23-2019, 10:14 AM
  2. Paint highest value of two cells
    By thomexcel in forum Excel General
    Replies: 4
    Last Post: 02-08-2018, 02:40 PM
  3. [SOLVED] Paint line of cells according to a cell content
    By Droriley in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2017, 04:27 PM
  4. Need help with simple format paint macro
    By MGARDNER in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2014, 10:03 PM
  5. copy multiple row from one sheet to another depended on one cells text.
    By bramer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2013, 12:06 PM
  6. search for a given number and paint the cells in colors
    By Antonio Rosales in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-29-2013, 10:59 AM
  7. if blank cells, paint yellow. if cell to left is less than a number, don't paint
    By curbster in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-09-2009, 02:40 AM

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