+ Reply to Thread
Results 1 to 10 of 10

Trouble With Conditional Formatting, Rows, and In-Betweens

  1. #1
    Registered User
    Join Date
    10-16-2017
    Location
    Utah, United States
    MS-Off Ver
    2016
    Posts
    11

    Question Trouble With Conditional Formatting, Rows, and In-Betweens

    So, before we get too far into this, I should say: Yes, I have done searching for this, and no, I haven't found any tutorials, guides, or tips that are helping me sort this out.

    I'm working on a spreadsheet (obviously), and I want to conditionally format the entire row based on the data found in one column at the end of the row. Obviously, I had to do custom rules and formulas to achieve this, which I found out after some searching.

    The problem is this: nothing is working the way it's supposed to (as far as I can tell).

    oyVSx4i.png

    The rules I'm trying to achieve are this:

    If the H value is between 0 and 1600, I'd like the entire row to be green.

    If the H value is over 1600, I'd like the entire row to be yellow.

    If the H value is below 0, I'd like the entire row to be red.

    Problem is, no order I've tried as made this work, and the only thing is a multi-colored mess.

    What am I doing wrong or missing?

  2. #2
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    Hi Spooky, you can use the INDIRECT formula for this. Do you have a sample workbook that you can attach?

  3. #3
    Registered User
    Join Date
    10-16-2017
    Location
    Utah, United States
    MS-Off Ver
    2016
    Posts
    11

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    I have the screenshot I provided, and if you can tell me how, I'll attach the workbook file (which is pretty limited to begin with).

    Is there any way you could give me an example of what I would need to put in the [FORMULA] section of the Conditional Formatting Rules Manager?

  4. #4
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    click on "Go Advanced" then "Manage Attachments" and attach that way.

    You need to select conditional formatting -> new rule -> use formula -> enter the formula =INDIRECT("H"&ROW())>1600 (for example), enter the format you want.

    Then conditional formatting -> manage rules -> applies to enter your range.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    for green: =AND($H2 > 0,$H2 < 1600)
    but you need to define what if : =0 and =1600

  6. #6
    Registered User
    Join Date
    10-16-2017
    Location
    Utah, United States
    MS-Off Ver
    2016
    Posts
    11

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    OKAY! I think I figured something out, using advice from both sandy and maym.

    For the red text, the formula was =INDIRECT("H"&ROW())<0.

    For the green text, the formula was =INDIRECT("H"&ROW())<160.

    For the yellow text, the formula was =INDIRECT("H"&ROW())>1600.

    AND, what I did was put the rules in that order. So, the RED rule supersedes the green rule. So, everything below 1600 is green, but everything below 0 is red, and that's applied over the top.

    With the rule order, I don't have to worry about the complexity of a range formula(between x and y). At least, not for this project. Major thanks to maym for introducing me to the INDIRECT command, and the "H"&ROW() stuff.

    I'm not sure I fully understand; for example, why do we have that empty parentheses? Why is it "H"&ROW when the data is in a column?

    But I know enough to solve my problem for now, and stumble through if it arrive again. Thank you!
    Last edited by SpookyNoodle; 10-17-2017 at 02:23 PM.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    ROW() will return the row number that the formula is in.

    e.g. =ROW() in H4 will return 4.


    That being said, I would use these:

    =$H2<0
    =$H2<160
    =$H2>1600

    instead of building the same thing through INDIRECT.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.

  9. #9
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    glad to help. As falcon said, ROW() will return the row number that the formula is in.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,848

    Re: Trouble With Conditional Formatting, Rows, and In-Betweens

    Rule 08: Cross-posting Without Links

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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: 1
    Last Post: 12-08-2016, 03:14 PM
  2. Trouble displaying conditional formatting from one sheet in another
    By jacklondon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-02-2016, 06:55 AM
  3. Having Trouble using conditional formatting
    By commanderjarak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2014, 08:42 PM
  4. [SOLVED] Count weeks betweens dates
    By krista_o in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 12:15 PM
  5. If Then with Multiple Betweens...
    By JeffGreat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2012, 07:55 PM
  6. [SOLVED] Trouble with Conditional formatting.
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-21-2012, 09:12 PM
  7. Replies: 5
    Last Post: 02-25-2010, 06:19 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