VLookup formula gives error

Closed
Report
Posts
1
Registration date
Wednesday April 18, 2018
Status
Member
Last seen
April 18, 2018
-
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
-
=VLOOKUP(A29,'I:\Vending Reports\2018\3. March 2018\[March 2018.xlsm]Crews'!$A$1:$H$370,8,FALSE)+G29

This is my formula. It is supposed to look for person's name in a previous months report and add the current months total spent in G29 for total. The problem is when I add a new employee and their name is not in the previous report, I get a N/A instead of just the current total spent. How can I fix this please?

2 replies


start with:
=IF(yourcode_here<>"" , yourcode_here , "not found")


Try that!
0
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
Hi Itlrose,

You ran into an error which stops the formula from working.

=IF(ISERROR(VLOOKUP(A29,'I:\Vending Reports\2018\3. March 2018\[March 2018.xlsm]Crews'!$A$1:$H$370,8,FALSE)),G29,=VLOOKUP(A29,'I:\Vending Reports\2018\3. March 2018\[March 2018.xlsm]Crews'!$A$1:$H$370,8,FALSE)+G29)

When the VLOOKUP part creates an error the value will be G29. When it doesn't then your original formula will do it's work.

Best regards,
Trowa
0
First, thank you so much for responding with a possible solution, however, when I paste the formula in the cell, Excel returns an error message, it's not seeing it as a formula. Keep in mind that I am a rookie with formulas, am I doing something wrong or could there be a slight error with the formula that Excel doesn't like?
0
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
Hi Itlrose,

Sorry, my bad, forgot to remove the second = symbol:
=IF(ISERROR(VLOOKUP(A29,'I:\Vending Reports\2018\3. March 2018\[March 2018.xlsm]Crews'!$A$1:$H$370,8,FALSE)),G29,VLOOKUP(A29,'I:\Vending Reports\2018\3. March 2018\[March 2018.xlsm]Crews'!$A$1:$H$370,8,FALSE)+G29)

How does that work?

Best regards,
Trowa
0
Thank you, this did work out perfectly for me. You have saved me a lot of time.
0
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
That's great and thanks for the feedback!
0