+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting Multiple Rows... but individually. Details in body.

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    Outer Space, Milky Way
    MS-Off Ver
    Excel 2012
    Posts
    23

    Conditional Formatting Multiple Rows... but individually. Details in body.

    Hello Dear Excel Forumers

    I have a challenge for you today:

    I have multiple rows of numbers. I want to simply conditional format in two colors, in this case I will use Red to Green.

    If I select each row individually and CF, then the colors will be applied to each row individually, which is what I want. HOWEVER, I have numerous rows of data, and I need to somehow go through this process more efficiently than selecting each individual row and CF-ing. If I just select the entire area, CF will treat the area as one data set, but I need it to be row-specific. Is this possible?

    Here is a dummy spreasheet:

    example.xlsx

    I want "EXAMPLE 1".

    Thanks so much for taking the time to read this.

    Best,
    gray-ish

  2. #2
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    I deleted example 2 of your sample sheet and cleared to formatting rules, then used that as a test for this macro:
    Please Login or Register  to view this content.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    cpl of questions...
    1. you said you wanted the row to change color, but in your example (that you want) each cell is a different color?
    2. what do you want the color change based on?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-01-2012
    Location
    Outer Space, Milky Way
    MS-Off Ver
    Excel 2012
    Posts
    23

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    Sorry I was unclear.

    I want to change color based on the number value (largest, smallest, in the middle). However, I only want to look at individual rows. So the largest value, in my case will be green, will be the largest value in that row. Same with the smallest. The problem is, if I have several rows, I want to be able to do this type of CF-ing for all the rows individually.

    If I select all the rows together as one big block of cells and apply red/green CF-ing, the lowest number will be the respective to the entire block of cells, not the lowest value in each row.

    The difference can be seen in the excel file under data point April and #1. In both examples, the value is 4. In example 1, which is what I want, it is the highest value in the row, so it's green. In example 2, which I DON'T want, it is yellow because it is relative to the entire 3x4 block of cells

    I can get the correct CF-ing by formatting each row one at a time, but if I have numerous rows, it becomes a very tedious task. Is there a way around this?

    I hope that helped.

  5. #5
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    Quote Originally Posted by gray-ish View Post
    Sorry I was unclear.

    ...Is there a way around this?
    Did you try the macro I posted above?

  6. #6
    Registered User
    Join Date
    08-01-2012
    Location
    Outer Space, Milky Way
    MS-Off Ver
    Excel 2012
    Posts
    23

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    Nope, I don't know how to use excel macros. I do have programming experience and the logic in your loop looks correct, but I have never used excel macros.

    Oh poop I realized I posted this thread in under "Excel Programming / VBA / Macros". It was supposed to be under "Functions". I really appreciate your help. I will try to learn excel macros to test your code. Thanks so much!

  7. #7
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    Haha! No problem, it happens to the best of us. Given your background, then adding a macro should be easy. Here is a link to help get you started: Getting Started

    I haven't really found an efficient way of doing conditional formatting other than taking all of the absolute references out and then using the format painter...

  8. #8
    Registered User
    Join Date
    08-01-2012
    Location
    Outer Space, Milky Way
    MS-Off Ver
    Excel 2012
    Posts
    23

    Re: Conditional Formatting Multiple Rows... but individually. Details in body.

    Thanks for the link to iProgrammer, I appreciated it!

    Yeah format painter is really the best (of the worst) way to do it without macros.

+ 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