+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Using an IF statement along with a VLOOKUP

Hybrid View

derek7467 Using an IF statement along... 03-12-2012, 09:31 AM
NBVC Re: Using an IF statement... 03-12-2012, 09:35 AM
derek7467 Re: Using an IF statement... 03-12-2012, 09:48 AM
  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    NJ
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    5

    Using an IF statement along with a VLOOKUP

    Greetings everyone!

    I have an excel file with 2 spreadsheets in it that house my data:

    Tab 1: Raw Data, along with a separate Column for my VLOOKUP
    Tab 2: Data, Tab 1 pulls from for the vlookup.

    What i would like to do is the following: (Use the IF statement)

    I would like another column B on tab 1 to return data from tab 2, but only on the results from the vlookup Column A.

    Tab 2 is a sheet of usernames and email addresses in 2 separate columns
    Tab 1 is a raw data sheet with a bunch of info on it. my vlookup on tab 1 column A only returns results on matched usernames from tab 2.
    I would like to have tab 1 display the email address from tab 2 if the username is matched in my vlookup.
    Last edited by derek7467; 03-12-2012 at 09:51 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using an IF statement along with a VLOOKUP

    You use VLOOKUP to return from any column where first column is matched.

    e.g.

    =VLOOKUP(A2,'Sheet 2'!A:B,2,FALSE) returns emails from column B when Column A is matched. Otherwise you get an error...

    to remove the error,

    In XL2003 and prior, =IF(Isnumber(match(A2,'Sheet 2'!A:A,0)),VLOOKUP(A2,'Sheet 2'!A:B,2,FALSE),"")

    in XL2007 and after =IFERROR(VLOOKUP(A2,'Sheet 2'!A:B,2,FALSE),"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-12-2012
    Location
    NJ
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    5

    Re: Using an IF statement along with a VLOOKUP

    thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

+ 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