+ Reply to Thread
Results 1 to 11 of 11

Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

  1. #1
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    I need a Macro To Highlight Cells A Through F Depending On What is In Column C.


    For Example If Column C had the Letter D in it I need it to hight light Cells For that Row Yellow. If Column C had the Letter M in it I need it to highlight the Cells Orange from that row.


    Highlighting From A Through F is needed. Example File Included Below.
    Attached Files Attached Files
    Last edited by donnydorko; 09-17-2010 at 11:08 AM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Please Login or Register  to view this content.
    Sub Testing()
    Last edited by JieJenn; 09-24-2010 at 03:53 PM.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    letter is case sensitive..

  4. #4
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    works great, but i needed it to stop at column F, not highlight the entire row.

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Please Login or Register  to view this content.
    Last edited by JieJenn; 09-24-2010 at 03:54 PM.

  6. #6
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    works great , appreciate it

  7. #7
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Have another request, macro has been working great but i was wondering if the column contains any other letter besides D or M if it could shade those rows 1 standard color.


    So for example all D would be Yellow, M would be blue, and any other letter would be red .


    Any cell with a blank would be ignored.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    And why use a macro, Excel has conditional Formatting
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  9. #9
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Please Login or Register  to view this content.
    I did it for jen, i cant edit her posts but i reposted the code in the proper #.
    Attached Files Attached Files
    Last edited by donnydorko; 09-17-2010 at 12:59 PM.

  10. #10
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Macro revision needed. I was wondering if the column contains any other letter besides D or M if it could shade those rows 1 standard color.
    So for example all D would be Yellow, M would be blue, and any other letter would be red .
    Any cell with a blank would be ignored.

  11. #11
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    can anyone help with the revision?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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