# VLookup formula gives error

Closed
ltlrose Posts 1 Registration date Wednesday April 18, 2018 Status Member Last seen April 18, 2018 - Updated on Apr 19, 2018 at 11:34 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Apr 24, 2018 at 11:58 AM
=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 responses

Blocked Profile
Apr 18, 2018 at 04:25 PM

Try that!
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Updated on Apr 19, 2018 at 11:25 AM
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
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?
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 23, 2018 at 11:28 AM
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
Thank you, this did work out perfectly for me. You have saved me a lot of time.
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 24, 2018 at 11:58 AM
That's great and thanks for the feedback!