+ Reply to Thread
Results 1 to 6 of 6

formula to highlight cell based on two variables

  1. #1
    Forum Contributor
    Join Date
    05-29-2012
    Location
    Walnut, Ca
    MS-Off Ver
    Excel 2010
    Posts
    182

    formula to highlight cell based on two variables

    Attachment 377867

    I am trying to to have a cell highlight if it matches another cell in a column on another tab and if another column contains specific data.

    So far I have =ISERROR(MATCH(C4,Graduates,0))=FALSE and it works for only part of the problem

    I want Tab 2014-2015, Column C to highlight in Green if the data in the cell matches any of the cells in column A on the Graduates tab (Graduates in my formula refers to a list which is column A) which it appears to be doing but I want the formula to go one step further. If the say C4 does match any of A2:A5000 I then want it to look at the Graduates tab, same row, column D (Major_Code) and if the same row says "0105-Registered Vet Technology", then I want C4 to highlight in Green. If the D column on the graduates tab does not say "0105-Registered Vet Technology", I want it to highlight in blue.

    Any suggestions?
    Last edited by FDibbins; 02-17-2015 at 12:52 PM.

  2. #2
    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,929

    Re: formula to highlight cell based on two variables

    I have removed your attachment, I saw it contained personal data (email addy's). IT is never wise to include sensitive info in public forums

    This will do it for you...
    =INDEX(Graduates!$D$2:$D$244,MATCH(C4,Graduates,0))="0105-Registered Vet Technology"

    A few points to consider...
    1. CF works on TRUE/FALSE only, so there is no need to include ISERROR or =FALSE
    2. CF can become very resource-heavy. I see that you have used it extensively, and your file is pretty slow now (not sure if thats the only reason)
    consider reducing the range of your CF rules, they go down to row 5000, but your data barely goes past 500
    3. consider using this in 2014-2015 Y2 down...
    =IF(X4="","",IF(X4=0,"COMPLETED",IF(X4<4,"ALMOST","NO")))
    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

  3. #3
    Forum Contributor
    Join Date
    05-29-2012
    Location
    Walnut, Ca
    MS-Off Ver
    Excel 2010
    Posts
    182

    Re: formula to highlight cell based on two variables

    Hello, this appeared to be working but a few names were highlighted when they didn't contain the "0105-Registered Vet Technology"

  4. #4
    Forum Contributor
    Join Date
    05-29-2012
    Location
    Walnut, Ca
    MS-Off Ver
    Excel 2010
    Posts
    182

    Re: formula to highlight cell based on two variables

    some names are listed more than once on the graduates list, I need the formula to look at all of the rows that contain the name and then check column D for the verbiage. If any of the rows with the individuals name says the verbiage, then highlight.

  5. #5
    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,929

    Re: formula to highlight cell based on two variables

    I dont have your file, and deleted your upload from here (sensitive info), so please put a dummy WB together, and upload again

  6. #6
    Forum Contributor
    Join Date
    05-29-2012
    Location
    Walnut, Ca
    MS-Off Ver
    Excel 2010
    Posts
    182

    Re: formula to highlight cell based on two variables

    Current RVT Students-tester.xlsx

    Here is a file without personal data

+ 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. Formula to Return a Value based on 2 Variables
    By Howdoesitwork in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-30-2015, 12:42 PM
  2. [SOLVED] Highlight cell based on total quantity value based on repeated order numbers
    By PWilson0727 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2014, 02:02 PM
  3. Replies: 1
    Last Post: 01-20-2014, 03:52 AM
  4. [SOLVED] Formula based on multiple variables
    By Jmoney in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2013, 10:32 AM
  5. Formula to calculate single cell based on many variables
    By malawimick in forum Excel General
    Replies: 7
    Last Post: 12-15-2011, 02:13 AM

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