Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CochranConsult
 
Posts: n/a
Default Replacing #N/A response when obtained in Lookup function

When using Vlookup and there is no direct match the response is "#N/A",
telling me that there is no value in the lookup table. The problem is that I
have to sum the results of the lookup function. Since some of the values are
"#N/A" the sum of the column is "#N/A". How can I easily replace the "#N/A"
with either text or a "0" so that the sum formula for the column produces an
answer?
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=IF(ISNA(MATCH(A1,J:J,FALSE)),"Not found",VLOOKUP(A1,J:K,2,FALSE))

In article ,
"CochranConsult" wrote:

When using Vlookup and there is no direct match the response is "#N/A",
telling me that there is no value in the lookup table. The problem is that I
have to sum the results of the lookup function. Since some of the values are
"#N/A" the sum of the column is "#N/A". How can I easily replace the "#N/A"
with either text or a "0" so that the sum formula for the column produces an
answer?

  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

One method:

=IF(ISNA(VLOOKP(---)),"",VLOOKUP(---))

or:

=IF(COUNTIF(lookup_column,lookup_value),VLOOKUP(---),"")

Or you could leave your VLOOKUP as is and use:

=SUMIF(A:A,"<#N/A")

HTH
Jason
Atlanta, GA

"CochranConsult" wrote:

When using Vlookup and there is no direct match the response is "#N/A",
telling me that there is no value in the lookup table. The problem is that I
have to sum the results of the lookup function. Since some of the values are
"#N/A" the sum of the column is "#N/A". How can I easily replace the "#N/A"
with either text or a "0" so that the sum formula for the column produces an
answer?

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Use the ISNA error trap.

=IF(ISNA(VLOOKUP(E2,F2:H19,2,FALSE)),"",VLOOKUP(E2 ,F2:H19,2,FALSE))

Change the "" to 0 if that is what you want displayed.


Gord Dibben Excel MVP

On Sat, 14 May 2005 09:32:03 -0700, "CochranConsult"
wrote:

When using Vlookup and there is no direct match the response is "#N/A",
telling me that there is no value in the lookup table. The problem is that I
have to sum the results of the lookup function. Since some of the values are
"#N/A" the sum of the column is "#N/A". How can I easily replace the "#N/A"
with either text or a "0" so that the sum formula for the column produces an
answer?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
maplesugarsnow
 
Posts: n/a
Default Replacing #N/A response when obtained in Lookup function

This was a great help to me!! Thanks.

"Gord Dibben" wrote:

Use the ISNA error trap.

=IF(ISNA(VLOOKUP(E2,F2:H19,2,FALSE)),"",VLOOKUP(E2 ,F2:H19,2,FALSE))

Change the "" to 0 if that is what you want displayed.


Gord Dibben Excel MVP

On Sat, 14 May 2005 09:32:03 -0700, "CochranConsult"
wrote:

When using Vlookup and there is no direct match the response is "#N/A",
telling me that there is no value in the lookup table. The problem is that I
have to sum the results of the lookup function. Since some of the values are
"#N/A" the sum of the column is "#N/A". How can I easily replace the "#N/A"
with either text or a "0" so that the sum formula for the column produces an
answer?





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
Lookup Function Problem seve Excel Discussion (Misc queries) 9 February 28th 05 02:46 AM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
Index table lookup anomaly Carole O Excel Worksheet Functions 9 December 9th 04 04:33 PM
Excel Lookup Functions Paul Adams Excel Worksheet Functions 1 November 10th 04 02:40 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 03:58 AM.

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

About Us

"It's about Microsoft Excel"