+ Reply to Thread
Results 1 to 5 of 5

Excel 2003 - VLOOKUP with IF?

  1. #1
    Registered User
    Join Date
    05-27-2008
    Posts
    25

    Excel 2003 - VLOOKUP with IF?

    I'm creating a workbook that autofills data from various files saved on a shared drive. The data changes on a monthly basis to provide report information for various parties. I'm using a main sheet to hold the data, which then transfers to a Powerpoint template. The problem I'm finding is when the refreshed data has no records. The formula I'm using to retrieve the data is:-

    =VLOOKUP(A1,Data1!$A$1:$D$7,4,TRUE)

    Works fine when there is data there to retrieve, but if it's empty (other than the headings) or the particular contractor isn't included for any particular month, the results are not exactly what I'm looking for! Is it possible to use an IF statement first to establish whether the fields are empty and populate the fields accordingly, and then follow that with the VLOOKUP formula?

    I've attached a mockup of what I'm trying to do which will hopefully help.ForumDataSheet.xls

    As always, any help/advice appreciated.
    Last edited by db1966; 03-16-2012 at 12:49 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Excel 2003 - VLOOKUP with IF?

    try this

    PHP Code: 
    =IF(ISERROR(VLOOKUP(B1,Data1!$A$1:$D$7,4,FALSE)),"",VLOOKUP(B1,Data1!$A$1:$D$7,4,FALSE)) 

  3. #3
    Registered User
    Join Date
    05-27-2008
    Posts
    25

    Re: Excel 2003 - VLOOKUP with IF?

    Perfect! Thanks, hadn't even considered using ISERROR, much appreciated

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Excel 2003 - VLOOKUP with IF?

    How about:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Excel 2003 - VLOOKUP with IF?

    Thats a good idea never thought of that!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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