+ Reply to Thread
Results 1 to 12 of 12

Highlight if Greater/Less then Target Cell

  1. #1
    Registered User
    Join Date
    05-18-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Highlight if Greater/Less then Target Cell

    I am trying to create a ranking structure but it does not seem to work. I want cell A4 to highlight green, or red depending if the % value is higher then Cell D4 on another sheet which is the target. But its driving me nuts... sadly I will admit I have not used excel since high school.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Highlight if Greater/Less then Target Cell

    Conditional formatting will not cross worksheets unless you get into named ranges or VBA.

    Could you link D4 to the ranking sheet and then we could use that cell as the cell to create the condition from or do you want to go with a named range or VBA?

    Are you just looking at the one cell D4 or in the end, many different cell on the other sheet?
    HTH
    Regards, Jeff

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Highlight if Greater/Less then Target Cell

    The CF formula on cell A4 would be something like this for a 25% threshhold:

    =ABS(Sheet2!$D$4-A4)/Sheet2!$D$4>0.25


    On Excel 2003 and earlier you would need to NAME the cell D4 on sheet2. If define the name as MyVal then this CF formula would work:

    =ABS(MyVal-A4)/MyVal>0.25
    Last edited by JBeaucaire; 05-18-2012 at 08:09 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    05-18-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Highlight if Greater/Less then Target Cell

    many different cells, The sheets in the work books are as follows

    Summary, Targets, Week 1, Week 2, Week 3, Week 4. Essentially the TARGETS will be the quarterly goals to store the data, and then on SUMMARY and WEEK sheets if those targets are not being met it would highlight the cell of the corresponding target for easy reference.

  5. #5
    Registered User
    Join Date
    05-18-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Highlight if Greater/Less then Target Cell

    So if the goal was 8% but on WEEK 1, or SUMMARY the total for that product line was only 5% it would highlight red, but if it was at or over 8% it would highlight green.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Highlight if Greater/Less then Target Cell

    Is there a way you can link the target to the summary sheet on then base your conditional formatting there off of the goal?

    I tried Jerry's initial suggestion, but for me, I can't get Excel to recognize a cell from another sheet unless it is a named range. I must be missing something!

  7. #7
    Registered User
    Join Date
    05-18-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Highlight if Greater/Less then Target Cell

    Hmmm, I suppose I could put a "TARGETS' Cells on each sheet, that pulls from the main "TARGETS" Sheet and then when I change main targets I would auto adjust all other fields in all sheet. Hmmm ill have to try that or a version of it.

  8. #8
    Registered User
    Join Date
    05-18-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Highlight if Greater/Less then Target Cell

    Yeah that works, but that is going to be a pain and screw up some of my other sheets. Any other ideas on how to get around that?

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Highlight if Greater/Less then Target Cell

    Hard to say without seeing what you are dealing with, how many cells and so forth!

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Highlight if Greater/Less then Target Cell

    Quote Originally Posted by JBeaucaire View Post
    The CF formula on cell A4 would be something like this for a 25% threshhold:

    =ABS(Sheet2!$D$4-A4)/Sheet2!$D$4>0.25
    Hi Jerry,

    So what's the secret?

    I'm using 2007 and after entering this formula in CF I get "You cannot use references to other worksheets or workbooks for Confitional Formatting criteria"

    Is it possible this is only for 2010 and not anything lower?

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Highlight if Greater/Less then Target Cell

    You're right, Jeff. It was introduced in 2010 version.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Highlight if Greater/Less then Target Cell

    2003 and 2007 and 2010 should all be able to use the second version of that formula that uses a named cell on the remote sheet.

+ 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