Vlookup error

Nanogirl21

Active Member
Joined
Nov 19, 2013
Messages
331
Office Version
  1. 365
Platform
  1. Windows
I am using the below formula to populate a cell based on dates from a different worksheet. Everything is working properly, but I am getting error #N/A when the date is not available. How can I modify the formula to return a blank cell (no text) when an error #N/A is returned?

PHP:
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE))," ",VLOOKUP(F10,Dates!$A:$I,2,FALSE))&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE)
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
In your example (in red), you're returning a "space". Have you tried: "" without a space between the quotations?
 
Upvote 0
<code><code></code></code><code><code></code>Instead of
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE))," ",VLOOKUP(F10,Dates!$A:$I,2,FALSE))&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE)


Try
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE)),"",VLOOKUP(F10,Dates!$A:$I,2,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE))

Hope this helps

M.


</code>
 
Upvote 0
I am using the below formula to populate a cell based on dates from a different worksheet. Everything is working properly, but I am getting error #N/A when the date is not available. How can I modify the formula to return a blank cell (no text) when an error #N/A is returned?

PHP:
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE))," ",VLOOKUP(F10,Dates!$A:$I,2,FALSE))&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE)

Not sure if you were meaning the full formula or if you were adding this to the formula already trying to remove the N/A, but to get rid of NA, you can use IFERROR
=IFERROR(IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE))," ",VLOOKUP(F10,Dates!$A:$I,2,FALSE))&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE),"")
 
Upvote 0
<code><code></code></code><code><code></code>Instead of
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE))," ",VLOOKUP(F10,Dates!$A:$I,2,FALSE))&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE)


Try
=IF(ISERROR(VLOOKUP(F10,Dates!$A:$I,2,FALSE)),"",VLOOKUP(F10,Dates!$A:$I,2,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,3,FALSE)&CHAR(10)&VLOOKUP(F10,Dates!$A:$I,7,FALSE))

Hope this helps

M.


</code>

Perfect. Thank you.
 
Upvote 0
I'm trying to use this again an can't get it right. How would I add an ISERROR to the below formula?

IF VLOOKUP(D5,Events!B:Z,9,FALSE) CONTAINS ANY ERROR THEN MAKE THE CELL BLANK

IF VLOOKUP(D5,Events!B:Z,9,FALSE) is not blank then use the formula

Code:
=IF(VLOOKUP(D5,Events!B:Z,9,FALSE)="yes",VLOOKUP(D5,Events!$B:$Z,3,FALSE)&CHAR(10)&VLOOKUP(D5,Events!$B:$Z,2,FALSE)&CHAR(10)&VLOOKUP(D5,Events!$B:$Z,6,FALSE),"")
 
Upvote 0
=iferror(VLOOKUP(D5,Events!B:Z,9,FALSE),””)


what do i do with the rest of the formula?


  • =IF(VLOOKUP(D5,Events!B:Z,9,FALSE)="yes",VLOOKUP(D5,Events!$B:$Z,3,FALSE)&CHAR(10)&VLOOKUP(D5,Events!$B:$Z,2,FALSE)&CHAR(10)&VLOOKUP(D5,Events!$B:$Z,6,FALSE),"")
 
Upvote 0
Try something like this

=IF(ISNUMBER(MATCH(D5,Events!B:B,0)),"rest of the formula","")

M.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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
Back
Top