Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ww
 
Posts: n/a
Default Vlookup returning #N/A

Hi all I could use some help with a Vlookup.

I have a range name of 'rng' on sheet A.
Column A
1
2
3
4
5
6

In a different file I have a range name 'table'
Column A Column B
1 20
3 5
4 7
6 13

My problem is with a vlookup since certain numbers don't exist in 'table' it
returns a #N/A so I end up with.

Column A Column B
1 20
2 #N/A
3 5
4 7
5 #N/A
6 13

Is there a way to return a '0' instead of #N/A on a vlookup so I can still
sum Column B? Thanks for any help in advance.
  #2   Report Post  
Harry Stottle
 
Posts: n/a
Default


-----Original Message-----
Hi all I could use some help with a Vlookup.

I have a range name of 'rng' on sheet A.
Column A
1
2
3
4
5
6

In a different file I have a range name 'table'
Column A Column B
1 20
3 5
4 7
6 13

My problem is with a vlookup since certain numbers don't

exist in 'table' it
returns a #N/A so I end up with.

Column A Column B
1 20
2 #N/A
3 5
4 7
5 #N/A
6 13

Is there a way to return a '0' instead of #N/A on a

vlookup so I can still
sum Column B? Thanks for any help in advance.
.
I suggest a possible solution is to insert the formula "

=IF(VLOOKUP(E4,Table,1)=E4,VLOOKUP(E4,Table,2),0)" .

The condition looks for a match of the data in column A
and if the value exists returns the value, else returns a
zero.

Should you enter a value less than 1 then an error will
still be produced. The best policy is to have the first
line of the table with a zero value:

Column A Column B
0 0
1 20
3 5 etc

Hope this solves your problem.

Regards

Harry
  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

ww

=ISNA(Vlookup formula,0,Vlookup formula)

e.g. =IF(ISNA(VLOOKUP(D1,A1:B12,2,FALSE)),0,VLOOKUP(D1, A1:B12,2,FALSE))

Alternative to show blank, not zero.

=IF(ISNA(VLOOKUP(D1,A1:B12,2,FALSE)),"",VLOOKUP(D1 ,A1:B12,2,FALSE))


Gord Dibben Excel MVP


On Tue, 22 Mar 2005 15:05:06 -0800, "ww" wrote:

Hi all I could use some help with a Vlookup.

I have a range name of 'rng' on sheet A.
Column A
1
2
3
4
5
6

In a different file I have a range name 'table'
Column A Column B
1 20
3 5
4 7
6 13

My problem is with a vlookup since certain numbers don't exist in 'table' it
returns a #N/A so I end up with.

Column A Column B
1 20
2 #N/A
3 5
4 7
5 #N/A
6 13

Is there a way to return a '0' instead of #N/A on a vlookup so I can still
sum Column B? Thanks for any help in advance.


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
VLOOKUP not returning results Chris Kellock Excel Worksheet Functions 14 March 19th 08 08:30 AM
vlookup and filename returning same result on each sheet. RogueSwan Excel Discussion (Misc queries) 3 March 22nd 05 10:08 PM
Vlookup and returning #n/a Cathrine Excel Worksheet Functions 3 December 23rd 04 02:23 PM
MY VLOOKUP IS RETURNING N/A AND THEREFORE MY TOTAL SUM AT THE BOT. Martin Excel Discussion (Misc queries) 2 December 13th 04 11:21 AM
troubleshoot vlookup returning #N/A dillon Excel Worksheet Functions 1 December 2nd 04 03:32 PM


All times are GMT +1. The time now is 05:24 PM.

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"