Removing #value! error in Vlookup

robert k

New Member
Joined
May 8, 2008
Messages
19
Hi

I have created the below formula to link weekly information into a weekly summary spreadsheet, columns C and D contain a list of people. My formula works but in some circumstances where people are not included in one week the formula will return a #value! error. I have tried using ISERROR at the beginning of the formula but this only returns 0 in all cases.

=IF(VLOOKUP(C1,'[Weekly.xls]Week1'!$C:$D,1,FALSE),VLOOKUP(C350,'[Weekly.xls]Week1'!$C:$M,11,FALSE),"0")

Any suggestions on how this error can be removed?

Thanks
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,124
=IF(ISERROR(MATCH(C1,'[Weekly.xls]Week1'!$C:$C,0)),0,VLOOKUP(C350,'[Weekly.xls]Week1'!$C:$M,11,FALSE))

EDIT: if you're returning a value from column M you could in theory streamline to

=ISERROR(MATCH(C1,'[Weekly.xls]Week1'!$C:$C,0)=FALSE)*VLOOKUP(C350,'[Weekly.xls]Week1'!$C:$M,11,FALSE)

ie multiply the resulting VLOOKUP value by either 1/0 --> 0 where no match found though you would be doing the VLOOKUP regardless of whether or not it's really required...
 
Last edited:
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,369
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Try:
Code:
=IF(ISERROR(VLOOKUP(C1,'[Weekly.xls]Week1'!$C:$D,1,FALSE)),0,VLOOKUP(C350,'[Weekly.xls]Week1'!$C:$M,11,FALSE))
HTH
 
Upvote 0

Joesli

New Member
Joined
Jul 2, 2008
Messages
20
Ive had the same problem. I was recommended IFERROR. however that only works with excel 2007 editions and above.

The solution is ISNA (Is Not Available):

=IF(ISNA(VLOOKUP());0;VLOOKUP())... only just remember to enter FALSE at the end of each VLOOKUP function!

My function ended up looking like this:

=+IF(ISNA(VLOOKUP(A8;'Y:\CERACO\Årsregnskab 2008\regnskab 2008\HTML Balancer Fra Navision\[Amaliegade.xls]Amaliegade'!$A$11:$M$230;13;FALSE));0;VLOOKUP(A8;'Y:\CERACO\Årsregnskab 2008\regnskab 2008\HTML Balancer Fra Navision\[Amaliegade.xls]Amaliegade'!$A$11:$M$230;13;FALSE))
 
Upvote 0

Stormseed

Banned
Joined
Sep 18, 2006
Messages
3,274
I was recommended IFERROR. however that only works with excel 2007 editions and above

hi friend,

what you are referring to is not very true. ISERROR() is used to replace any and all types of formula error while ISNA() is used to replace errors which display #N/A in a formula. Also, this works in any version of Excel including Excel 2007.
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,369
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Actually it is true. IFERROR is a new function in Excel 2007 whereby instead of writing something like:
Code:
=IF(ISERROR(formula),0,formula)
you can just write:
Code:
=IFERROR(formula,0)
to achieve the same thing.
HTH
 
Upvote 0

Stormseed

Banned
Joined
Sep 18, 2006
Messages
3,274
Actually it is true. IFERROR is a new function in Excel 2007 whereby instead of writing something like:
Code:
=IF(ISERROR(formula),0,formula)
you can just write:
Code:
=IFERROR(formula,0)
to achieve the same thing.
HTH

well, not quite acquainted with Excel 2007, have got it on my PC @ home, yet to discover and explore the Office Suite :cool:
 
Upvote 0

Forum statistics

Threads
1,190,877
Messages
5,983,361
Members
439,840
Latest member
billy1989

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top