Share via

Problems with nested IFs and #N/A errors

Anonymous
2019-09-03T19:09:23+00:00

I have a 3 tab worksheet labelled Current Customers, Old Customers and Order Form respectively. 

The Current Customers and Old Customers tabs each have 3 columns - Cust#, First Name and Last Name.

I have 5 cells on Order Form labelled Cust#, First Name, Last Name, New First Name and New Last Name.

When I enter data in the Cust # field I want the First Name and Last Name fields to auto-populate. 

First I want it to Index/Match the Current Customers tab. 

If it does not find the Customer number then I want it to Index/Match the Old Customers tab. 

If it still does not find a match then I want it to use the information in the New First Name and New Last Name fields. 

I can do the Index/Match and nested IFs, but my problem occurs when I get the #N/A errors.  The IFNA does not give me two options that can both be formulated.  The IFs consider #N/A a valid output.  Any help with the proper sequence and formulas to make this work would be greatly appreciated.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2019-09-03T22:30:16+00:00

    Hi jwelch176

    Please find and download from the link below a file with the answer to your question.

    https://www.dropbox.com/s/a1jtu82jy0pptdb/jwelch176-answer.xlsx?dl=0

    First Name Formula =IF($B$1="","",IFNA(VLOOKUP($B$1,'Current Customers'!$A$1:$C$11,2,0),IFNA(VLOOKUP($B$1,'Old Customers'!$A$1:$C$11,2,0),$B$4)))

    Last Name Formula =IF($B$1="","",IFNA(VLOOKUP($B$1,'Current Customers'!$A$1:$C$11,3,0),IFNA(VLOOKUP($B$1,'Old Customers'!$A$1:$C$11,3,0),$B$5)))

    ***************************************************************************************************

    Do let me know if you require any further help on this. Will be glad to help you.

    If this answer would be the solution to your question, I'll appreciate you mark it as answered

    Was this answer helpful?

    0 comments No comments