Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default IF/VLOOKUP with #N/A results

I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say "No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default IF/VLOOKUP with #N/A results

HI

Try this:

=IF(iserror(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"No
Shipments",IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")))

Regards,
Per

"Supe" skrev i meddelelsen
...
I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue
is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say
"No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default IF/VLOOKUP with #N/A results

We can add another IF arguement

=IF(AD3="x",IF(ISNA(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE)),"No
Shipments",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried"))

I'm not running it myself, but I think in 2007 you could also use:
=IF(AD3="x",IFERROR(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried"),"No Shipments")


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Supe" wrote:

I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say "No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default IF/VLOOKUP with #N/A results

The answer from Per is just fine but if you are using Excel 2007 you can use
a simpler formula

=IFERROR(IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE),"Not Carried"), "No shipments")

or (easier to follow)
=IF(AD3<"x","Not carried", IFERROR(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE), "No shipments")

Note you need only enter your formula once.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Supe" wrote in message
...
I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue
is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say
"No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default IF/VLOOKUP with #N/A results

I tried entering this formula and I get a message saying "You've entered too
many arguments for this function".


"Per Jessen" wrote:

HI

Try this:

=IF(iserror(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"No
Shipments",IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")))

Regards,
Per

"Supe" skrev i meddelelsen
...
I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue
is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say
"No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default IF/VLOOKUP with #N/A results

I am in 2007. I copied and pasted both of the examples below and get a
message saying "The formula you typed contains and error" on both.


"Bernard Liengme" wrote:

The answer from Per is just fine but if you are using Excel 2007 you can use
a simpler formula

=IFERROR(IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE),"Not Carried"), "No shipments")

or (easier to follow)
=IF(AD3<"x","Not carried", IFERROR(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE), "No shipments")

Note you need only enter your formula once.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Supe" wrote in message
...
I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue
is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say
"No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default IF/VLOOKUP with #N/A results

Disregards previuos message. I put an ! in front of the VLOOKUP range and
then a box popped up with a suggested formula and that worked. Thanks.

"Bernard Liengme" wrote:

The answer from Per is just fine but if you are using Excel 2007 you can use
a simpler formula

=IFERROR(IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE),"Not Carried"), "No shipments")

or (easier to follow)
=IF(AD3<"x","Not carried", IFERROR(VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'$A$2:$B$555555,2,FALSE), "No shipments")

Note you need only enter your formula once.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Supe" wrote in message
...
I have a IF function that if a box is marked with an "x" then do a VLOOKUP
against a separate worksheet to get a shipment total. If there is no "x"
then that item isn't carried so it lists "Not Carried" in the cell. Issue
is
if there is an "x", but there isn't a match in the sheet I am doing the
VLOOKUP in the results come back as #N/A. Would like that result to say
"No
Shipments" instead of #N/A. This is beyond my Excel capabalities. The
formula I have so far is below.


=IF(AD3="x",VLOOKUP(A3,'[Access
Data.xlsx]Data_Qry'!$A$2:$B$555555,2,FALSE),"Not Carried")



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum results of VLOOKUP Dewayne Excel Worksheet Functions 7 November 28th 07 04:53 PM
vlookup results in 0 sveazie Excel Discussion (Misc queries) 6 July 17th 07 09:20 AM
Vlookup with two results Luke Excel Discussion (Misc queries) 2 March 22nd 07 05:41 PM
to sum up all value results from VLOOKUP Linn Excel Worksheet Functions 1 March 7th 07 02:45 AM
how do you add vlookup results? Anna Excel Worksheet Functions 3 March 26th 05 03:05 AM


All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"