+ Reply to Thread
Results 1 to 5 of 5

Combine Formulas - Vlookup: Blanks, Errors, Values

  1. #1
    Registered User
    Join Date
    04-01-2014
    Location
    Mississippi
    MS-Off Ver
    Excel 2007
    Posts
    6

    Combine Formulas - Vlookup: Blanks, Errors, Values

    Hi yall,

    I'm trying to combine two formulas together to display the data as such.. (if vlookup cell is blank -> display blank) (if vlookup cell is populated -> display populated value) (if vlookup value comes up error -> display blank)

    I managed to comeup with the below formulas which the first one fixes my first two problems and the second fixes my third problem. But can't seem to figure out how to combine them all together.

    =IF(VLOOKUP(B4,'Time'!$B$5:$FH$26,39,FALSE)="","N/A",VLOOKUP(AUTO!B4,'Time'!$B$5:$FH$26,39,FALSE))

    =IFERROR(VLOOKUP(B4,'Time'!$B$5:$FH$26,40,FALSE),"")

    Anyone can help me?

  2. #2
    Registered User
    Join Date
    09-24-2013
    Location
    Twin Cities, MN
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Combine Formulas - Vlookup: Blanks, Errors, Values

    Just combine them:
    =IFERROR(IF(VLOOKUP(B4,'Time'!$B$5:$FH$26,39,FALSE)="","N/A",VLOOKUP(AUTO!B4,'Time'!$B$5:$FH$26,39,FALSE)),"")

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Combine Formulas - Vlookup: Blanks, Errors, Values

    Hi and welcome to the forum

    Unless you made a typo, your 1st and 2nd sets of formulas dont match. The 1st set looks in column 39, the 2nd set looks in column 40?

    =IF(VLOOKUP(B4,'Time'!$B$5:$FH$26,39,FALSE)="","N/A",VLOOKUP(AUTO!B4,'Time'!$B$5:$FH$26,39,FALSE))
    =IFERROR(VLOOKUP(B4,'Time'!$B$5:$FH$26,40,FALSE),"")
    Also, presumably, B4 is on sheet AUTO?
    If all 3 vlookups were meant to be the same, then try the suggestion from post #2

    VLOOKUP(B4,'Time'!$B$5:$FH$26,39,FALSE)
    VLOOKUP(AUTO!B4,'Time'!$B$5:$FH$26,39,FALSE)
    VLOOKUP(B4,'Time'!$B$5:$FH$26,40,FALSE)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    04-01-2014
    Location
    Mississippi
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Combine Formulas - Vlookup: Blanks, Errors, Values

    Oh my gosh! Thank you minnesotaart I'm having trouble with how that worked but it got the job done

    Fdibbins I made them formulas in two different columns when I was working out my solutions and forgot to change them to match so thanks for pointing that out.

  5. #5
    Registered User
    Join Date
    09-24-2013
    Location
    Twin Cities, MN
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Combine Formulas - Vlookup: Blanks, Errors, Values

    Think of "IFERROR" as a "wrapper". If a formula kinda works but sometimes gives you an error that you wish would just go away, then just "wrap" that formula with an IFERROR function and force it to what you want (in your case, a blank).

+ 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. [SOLVED] Combine two columns without blanks/Vlookup
    By dianaschar in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-27-2013, 11:09 AM
  2. Vlookup formulas and cell formatting errors
    By imaquila in forum Excel - New Users/Basics
    Replies: 13
    Last Post: 02-08-2012, 01:10 PM
  3. vlookup to return blanks for errors & blank cells
    By ariesmelissa in forum Excel General
    Replies: 4
    Last Post: 03-24-2010, 06:56 PM
  4. Combine 2 formulas to ignore errors?
    By ross.mitchell in forum Excel General
    Replies: 4
    Last Post: 12-09-2009, 09:25 AM
  5. Replies: 1
    Last Post: 08-25-2005, 03:43 AM

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