+ Reply to Thread
Results 1 to 4 of 4

Formula for Checking if a cell value equals another and printing the name in the cell

  1. #1
    Registered User
    Join Date
    04-14-2020
    Location
    South Africa
    MS-Off Ver
    365
    Posts
    2

    Formula for Checking if a cell value equals another and printing the name in the cell

    Good day Everyone,

    I was hoping someone could help me out with the following:

    i have two tables:
    the first table has ID values and the name of those ID values
    the second table only has some of the ID values from the first table

    I would like to know if there is a formula i could you that would allow me to search through all the ID in the first table and if it matches with the second table to print out the name of the item.

    I have tried AND statements with Multiply IF statements but im at the point of writing 1000+ if statements in order for it to show all the ID values.

    if i was not clear about the question please let me know.

    I have attached a sheet below:
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Formula for Checking if a cell value equals another and printing the name in the cell

    try the vlookup ... =VLOOKUP(A2,'First Table'!A:B,2,FALSE)
    and drag down.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    04-14-2020
    Location
    South Africa
    MS-Off Ver
    365
    Posts
    2

    Re: Formula for Checking if a cell value equals another and printing the name in the cell

    Hi Sambo thanks so much solve my issue and saved me years !!!!!!!!

    do you have a youtube tutorial on Vlookup ? or know of any good ones

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Formula for Checking if a cell value equals another and printing the name in the cell

    you can probably just search on vlookup, there are a lot of videos out there on it.
    but it essentially works like this...
    =VLOOKUP(A2,'First Table'!A:B,2,FALSE) is doing a Vertical lookup (the V part of Vlookup)
    where it is looking for A2 in the range set (in this case from) column A. When it finds the value anywhere in column A it then looks into column B to return the value there (that is what the 2 is for).
    You can also look up items in the same column just to verify they are there like =VLOOKUP(A2,'First Table'!A:A,1,FALSE)
    The last part, FALSE means to return exact value when found. If that was changed to TRUE it then returns approximate values but the table used 'First Table'!A:B,2,TRUE should then be in ascending order. You would use that for looking up inexact values.
    For instance you are looking up 1.05 but your table has 1 then 2 and what is beside the 1 is A and 2 is B, it would return the A because it isn't an exact match.
    Some people put =VLOOKUP(A2,'First Table'!A:B,2,0) instead of FALSE or =VLOOKUP(A2,'First Table'!A:B,2,1) instead of TRUE and the formula will work the same for either of those.
    For a VLOOKUP the value you are looking up can be in any column BUT you have to remember that the returned value HAS TO BE in a column to its right, if you have a value in cell A2 but where you are looking for its corresponding values in another area but the match is in column D of that tab and the value you want to have returned is in column B then you use an index/match, like...
    =INDEX(Sheet2!B:B,MATCH(A2,Sheet2!D:D,0))
    Hope that helps.

+ 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 - If a cell equals any cell in another column then...
    By XUmuskies34 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2020, 11:42 AM
  2. Make Cell BLANK if own cell formula equals ZERO
    By datacentralized in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-23-2019, 07:07 PM
  3. [SOLVED] If Formula (IF this condition is met, then adjacent cell equals above cell)
    By BryanHCR in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2019, 10:31 PM
  4. [SOLVED] IF/AND Formula in a cell, cross checking other cells then displaying them in another cell
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-27-2017, 10:06 AM
  5. Replies: 5
    Last Post: 10-29-2014, 05:40 PM
  6. [SOLVED] Need a formula that returns a the content from a cell if another cell equals yes
    By sumner06 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-20-2013, 06:41 PM
  7. checking if one cell equals another in another sheet
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2012, 07:44 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