+ Reply to Thread
Results 1 to 5 of 5

Conditional format a cell if value is found in list on another sheet

Hybrid View

hutch@edge.net Conditional format a cell if... 01-21-2014, 11:00 PM
benishiryo Re: Conditional format a cell... 01-21-2014, 11:16 PM
sktneer Re: Conditional format a cell... 01-21-2014, 11:46 PM
hutch@edge.net Re: Conditional format a cell... 01-22-2014, 12:34 AM
sktneer Re: Conditional format a cell... 01-22-2014, 12:37 AM
  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Conditional format a cell if value is found in list on another sheet

    Good day, Gurus.

    Not sure if this can be done. Column T in my workbook requires an entry, on any number of rows, for the country of origin. The entry in that column must exactly match the abbreviation for that country, which I have stored in a list on a separate hidden worksheet.

    Do I use conditional formatting or data validation to color this cell red if a user enters a value not found in my list, and can you please offer an example of how to best accomplish it?

    Thanks in advance for any help you can offer.
    Last edited by hutch@edge.net; 01-22-2014 at 12:37 AM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Conditional format a cell if value is found in list on another sheet

    hi there. i suggest you use Data Validation. it will stop them immediately rather than to highlight & they have to try and error. i'll share both methods anyway:
    1. say abbreviation list is in Sheet2!A2:A4. go to Sheet2 & select A2:A4.

    2. you should see a name box below the ribbon & on the left of the formula bar. it shows the cell reference. click on that & type a name. i'll type Abbrev. Press ENTER

    3. (i) for data validation, go to Sheet1 & select whichever rows you need them to fill (say T2:T10). go to Data -> Data Validation -> Allow: List -> Source:
    =Abbrev
    (ii) for Conditional Formatting, go to Sheet1 & select from U2:U10 (just so i can show you both methods). go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    =AND(COUNTIF(Abbrev,U2)=0,U2<>"")

    4. for (ii), format to the colour you desire & click ok

    Hutch.xlsx

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Conditional format a cell if value is found in list on another sheet

    Assuming that
    -- You have list of abbreviations on Sheet2!A2:A10
    -- You are entering values on sheet1 and from cell T2
    than try this.....

    --Create a helper column on sheet1 (say on col. AA from cell AA2), which you may hide.
    on cell AA2 use the below formula and copy it down

    AA2 =IF(T2<>"",NOT(ISNUMBER(MATCH(T2,Sheet2!$A$2:$A$10,0))))
    Now select the T2:"as far as needed" and make a new rule for conditional formatting using the following formula......

    =AA2=TRUE
    and set the format as per your requirement.

    For detail, pls find the attached sheet.

    Hope that helps.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: Conditional format a cell if value is found in list on another sheet

    Thanks for thw quick reply, guys. I went with benishiryo's solution using conditional formatting. It works best for me because often the data is copied and pasted into these cells, and also because the format of the sheet is pretty rigid, so I didn't want to add or hide any additional columns.

    Works perfectly. Thanks for the help!

    This thrread is solved!

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Conditional format a cell if value is found in list on another sheet

    Thanks for the feedback.

+ 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. Set conditional format based on value in cell on active sheet
    By graphicgoose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2013, 09:38 PM
  2. Replies: 3
    Last Post: 05-15-2013, 12:16 AM
  3. [SOLVED] Excel 2003: How to conditional format if cell contains any of a list of keywords
    By doublefour in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-07-2012, 09:28 AM
  4. [SOLVED] Change cell contents if found in a list on another sheet
    By fastcar in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-05-2012, 08:29 PM
  5. automatically copy a cell (due to a conditional format) to another sheet
    By marc eber in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2008, 12:19 PM

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