+ Reply to Thread
Results 1 to 4 of 4

If contained in the list return value

  1. #1
    Registered User
    Join Date
    07-01-2020
    Location
    Yerevan
    MS-Off Ver
    2010
    Posts
    44

    If contained in the list return value

    Hi All,

    I would like to write a formula such that a value of "High" is returned in Column B of sheet1 if the name of country in Column A is contained in the LIST OF COUNTRIES in another sheet (reference sheet).

    See the test workbook attached.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: If contained in the list return value

    If you use this formula, it returns TRUE instead of High

    =IFNA(VLOOKUP(A2,'Reference List'!$A$2:$A$25,1,0)=A2,"")
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-01-2020
    Location
    Yerevan
    MS-Off Ver
    2010
    Posts
    44

    Re: If contained in the list return value

    thanks, but I need to value of "High" to be returned. that's important.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: If contained in the list return value

    Here is a VBA solution for you.

    Please Login or Register  to view this content.
    How to install your new code
    • Copy the Excel VBA code
    • Select the workbook in which you want to store the Excel VBA code
    • Press Alt+F11 to open the Visual Basic Editor
    • Choose Insert > Module
    • Edit > Paste the macro into the module that appeared
    • Close the VBEditor
    • Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    To run the Excel VBA code:
    • Press Alt-F8 to open the macro list
    • Select a macro in the list
    • Click the Run button

+ 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. Return a value if specific text is contained in range.
    By lilit2222 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2021, 03:54 PM
  2. Replies: 2
    Last Post: 05-13-2021, 01:37 PM
  3. [SOLVED] Match 2 different text strings both contained in a cell, return value
    By excelforumkeys in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2018, 05:08 PM
  4. Return a cell value if a date is contained in a range of cells
    By studio95 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2016, 04:44 AM
  5. [SOLVED] How to Return Values Not Contained in a Range
    By Kerik in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-10-2015, 02:24 AM
  6. Replies: 4
    Last Post: 07-28-2015, 01:54 PM
  7. Return a value if criteria contained in cell
    By jhicsupt in forum Excel General
    Replies: 7
    Last Post: 10-05-2005, 05:05 AM

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