#1   Report Post  
Jim
 
Posts: n/a
Default vlookup

I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?

  #2   Report Post  
Anne Troy
 
Posts: n/a
Default vlookup

Change TO:
=IF(OR(ISERROR(VLOOKUP(...)),VLOOKUP(...)=0,"",VLO OKUP(...))
If the value in D6 exists, but the value to its right in the vlookup table
is blank, that does NOT produce an error, so ISERROR and ISNA won't handle
it. You have to say if it's zero, you want nothing or Tools--Options--View
and uncheck zero values.
************
Anne Troy
www.OfficeArticles.com


"Jim" wrote in message
...
I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are
formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default vlookup

I don't think that your OR will work the way you want if there is no match.

Anne Troy wrote:

Change TO:
=IF(OR(ISERROR(VLOOKUP(...)),VLOOKUP(...)=0,"",VLO OKUP(...))
If the value in D6 exists, but the value to its right in the vlookup table
is blank, that does NOT produce an error, so ISERROR and ISNA won't handle
it. You have to say if it's zero, you want nothing or Tools--Options--View
and uncheck zero values.
************
Anne Troy
www.OfficeArticles.com

"Jim" wrote in message
...
I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are
formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?


--

Dave Peterson
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default vlookup

You could check (up to three times):

=IF(ISERROR(VLOOKUP(A1,Sheet2!A:B,2,FALSE)),"",
IF(VLOOKUP(A1,Sheet2!A:B,2,FALSE)="","",VLOOKUP(A1 ,Sheet2!A:B,2,FALSE)))

or since you want to see "", you could check up to twice:

=IF(ISERROR(1/LEN(VLOOKUP(A1,Sheet2!A:B,2,FALSE))),"",
VLOOKUP(A1,Sheet2!A:B,2,FALSE))

(change the range/range names to what you want.)



Jim wrote:

I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?


--

Dave Peterson
  #5   Report Post  
Anne Troy
 
Posts: n/a
Default vlookup

You're right, of course. Thanks, Dave. :)
************
Anne Troy
www.OfficeArticles.com

"Dave Peterson" wrote in message
...
I don't think that your OR will work the way you want if there is no match.

Anne Troy wrote:

Change TO:
=IF(OR(ISERROR(VLOOKUP(...)),VLOOKUP(...)=0,"",VLO OKUP(...))
If the value in D6 exists, but the value to its right in the vlookup
table
is blank, that does NOT produce an error, so ISERROR and ISNA won't
handle
it. You have to say if it's zero, you want nothing or
Tools--Options--View
and uncheck zero values.
************
Anne Troy
www.OfficeArticles.com

"Jim" wrote in message
...
I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are
formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?


--

Dave Peterson





  #6   Report Post  
Jim
 
Posts: n/a
Default vlookup

The first one is the charm, thanks

"Dave Peterson" wrote:

You could check (up to three times):

=IF(ISERROR(VLOOKUP(A1,Sheet2!A:B,2,FALSE)),"",
IF(VLOOKUP(A1,Sheet2!A:B,2,FALSE)="","",VLOOKUP(A1 ,Sheet2!A:B,2,FALSE)))

or since you want to see "", you could check up to twice:

=IF(ISERROR(1/LEN(VLOOKUP(A1,Sheet2!A:B,2,FALSE))),"",
VLOOKUP(A1,Sheet2!A:B,2,FALSE))

(change the range/range names to what you want.)



Jim wrote:

I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?


--

Dave Peterson

  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default vlookup

The second one is nicer!

Jim wrote:

The first one is the charm, thanks

"Dave Peterson" wrote:

You could check (up to three times):

=IF(ISERROR(VLOOKUP(A1,Sheet2!A:B,2,FALSE)),"",
IF(VLOOKUP(A1,Sheet2!A:B,2,FALSE)="","",VLOOKUP(A1 ,Sheet2!A:B,2,FALSE)))

or since you want to see "", you could check up to twice:

=IF(ISERROR(1/LEN(VLOOKUP(A1,Sheet2!A:B,2,FALSE))),"",
VLOOKUP(A1,Sheet2!A:B,2,FALSE))

(change the range/range names to what you want.)



Jim wrote:

I am using the following:

=IF(ISERROR(VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)),"",( VLOOKUP(D6,Pri_Bus_Unit,2,FALSE)))

It is returning a 0 (zero) instead of a blank cell. The cells are formatted
as general. Even if I am using "-" a dash it is returning zero.

Any thoughts?


--

Dave Peterson


--

Dave Peterson
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
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 03:55 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"