+ Reply to Thread
Results 1 to 12 of 12

Color table row range based on row value

  1. #1
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Question Color table row range based on row value

    I have a Data validation where I have row number list from 1-10 and table with data. Now I select data validation and select 5. In this selection result Conditional formatting color row range from 1 to 5. How to do that?
    Last edited by 7absinth; 06-07-2017 at 08:16 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Color table row range based on row value

    Ho 7absinth,

    Do you have any sample sheet if so attach showing your expected results , make sure you remove sensitive data before uploading.

    Punnam

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Color table row range based on row value

    Hi ,

    Check this sample sheet .

    Punnam
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Re: Color table row range based on row value

    Quote Originally Posted by Punnam View Post
    Ho 7absinth,

    Do you have any sample sheet if so attach showing your expected results , make sure you remove sensitive data before uploading.

    Punnam
    Book1.xlsx

    Something like that.

  5. #5
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Color table row range based on row value

    Hi ,

    Need more details can you explain .

    Now it is clear , how about Raw data can you enter the data in H:M:S format or minutes if possible not using hr in the same cell

    Was it possible ?
    Last edited by Punnam; 06-07-2017 at 07:04 AM.

  6. #6
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Re: Color table row range based on row value

    So if I select 3 hours Conditional formatting color range from 20(min) to 3 hours. If I select 5 hours Conditional formatting color from 20 (min) to 5 hours. etc. All cells are text. No need for HH:MM:SS formatting.
    Last edited by 7absinth; 06-07-2017 at 07:13 AM.

  7. #7
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Re: Color table row range based on row value

    I played with ROW and ROWS formulas but still i found problems. Maybe BETWEEN ROWS somehow to make it? I am really dont know and stuck couple of hours.

    For example this Conditional Formatting formula color only one row range but I need all others that are above too:
    =MATCH(ROWS($A$5:$A5);$E$2;0) - copied from original workbook

    where $A$5:$A5 is sliding dependant range that return rows (rows 1,2,3...)
    $E$2 - data validation row # (for example 3)
    Last edited by 7absinth; 06-07-2017 at 07:37 AM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Color table row range based on row value

    Try this out.

    =ROW()<=MATCH($B$1,$A$4:$A$28,0)+ROW($A$3)

    used as the CF formula
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Re: Color table row range based on row value

    Madness!! Works like a charm! Only this formula is not enough understandable but works. Thank you A LOT Glenn.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Color table row range based on row value

    =ROW()<=<=MATCH($B$1,$A$4:$A$28,0)+ROW($A$3)

    Red: If the row number under consideration <=
    Blue: row number of the exact match of cell B1 in cells A4 to A28
    Green: plus 3, to take account of the fact that your data start on row 4.

    Simple (ish), really,

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  11. #11
    Registered User
    Join Date
    05-15-2017
    Location
    San Francisco
    MS-Off Ver
    2012
    Posts
    2

    Re: Color table row range based on row value

    In excel HOME conditional formation one option is there that you can click and apply conditionals for your range. LIke 1-5 green color, 6-8 - black color and 9-10 red color.

  12. #12
    Registered User
    Join Date
    12-12-2015
    Location
    Latvia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Thumbs up Re: Color table row range based on row value

    But not in this case. You have a text instead of numbers and each row text is unique.

    Only solution is a formula. Secondly need to color specific prior selected row range FROM-TO which rows to color.
    Open attached sample that is added in this thread and sooner or later you will notice the problem.

    Thanks again to Glenn for solution. This thread marked as solved completely. A++ grade from me.

+ 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. change fill color of a range of cells based on color of a cell?
    By DarMelNel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 04:48 PM
  2. How to Color Format a Range Based on the Cell Value-- Using VBA
    By AGALLEGOS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2014, 02:03 AM
  3. [SOLVED] Color cells in Range based on condition.
    By gammaman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2012, 10:27 AM
  4. Replies: 12
    Last Post: 12-19-2011, 01:01 PM
  5. Fill color based on a table of locations
    By urtzy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2011, 11:49 PM
  6. Setting Color of Range based on adjacent cell color
    By JimE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-02-2009, 09:04 PM
  7. Color Range Based On Number Range
    By ajocius in forum Excel General
    Replies: 1
    Last Post: 11-24-2006, 12:49 AM
  8. [SOLVED] color row based on table
    By Don S in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2005, 12:50 PM

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