+ Reply to Thread
Results 1 to 4 of 4

Macro Code Needed for Coloring Various rows based on the Criteria of the Row

  1. #1
    Registered User
    Join Date
    06-28-2017
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    54

    Macro Code Needed for Coloring Various rows based on the Criteria of the Row

    Hi, I'm in need of a macro to complete a spreadsheet that has rents and expenses projected out 10 years. Currently it looks a little bit over whelming at first glance, so I want the rent line to be highlighted to break it up a bit. Here's what I want (and I have a decent understanding of VBA so you can post something and i'll be able to make adjustments to the cells in my sheet)...

    The macro needs to start off in cell J2 and go down to cell J489. For every cell that has the word "Rent" in it in the J column, I want columns J:W to be highlighted grey to the corresponding row. So for example, if in cell J7 there was "Rent" input, the macro would highlight cells J7:W7 in grey. It seems pretty simple but I cant get it to work. Any help on this would be greatly appreciated. If you need more of a description let me know, I'm just sitting at my desk working on this project.

    Thanks!
    Last edited by Adamsc21; 08-07-2017 at 05:42 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro Code Needed for Coloring Various rows based on the Criteria of the Row

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-28-2017
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    54

    Re: Macro Code Needed for Coloring Various rows based on the Criteria of the Row

    Xladept - Worked like a charm. Thank you very much! Will add your rep

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro Code Needed for Coloring Various rows based on the Criteria of the Row

    You're welcome and thanks for the rep!

+ 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. Delete columns & Row based on criteria VBA code needed
    By Gary B in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-28-2014, 02:59 PM
  2. VBA code needed to copy rows based on mulitple wildcard criteria
    By derryt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2014, 08:56 AM
  3. [SOLVED] Code needed to move rows to different worksheet based on date
    By collinlo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2012, 11:28 AM
  4. Macro needed: list results based on criteria
    By nantoy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2012, 09:18 PM
  5. Replies: 5
    Last Post: 11-17-2010, 04:23 AM
  6. Replies: 7
    Last Post: 04-03-2010, 03:48 PM
  7. Coloring rows based on criteria
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2008, 10:51 PM

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