Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I avoid a BLANK cell being interpreted as a ZERO?

I have a price list of items on Sheet2 with product codes from 0 to
999 in column A and prices in the adjoining column B. I have called
this price list "items".

Now, when I try to do a vlookup function on a cell within Sheet1, I
come up with a price regardless of whether that cell is blank or has a
zero in it. My function looks like this: =VLOOKUP(Sheet1!A1,items,2)

How can I stop excel interpreting blank cells as cells with zeros in
them? Or how can I alter the function so that it doesn't try to match
up a blank cell A1 with a Cell containing 0 in table "items"?

I appreciate your help in advance.

Matthew Dowling
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can I avoid a BLANK cell being interpreted as a ZERO?

Try using

=VLOOKUP(Sheet1!A1,items,2,False)

Does this help?

--
Regards,
Tom Ogilvy

matt wrote in message
om...
I have a price list of items on Sheet2 with product codes from 0 to
999 in column A and prices in the adjoining column B. I have called
this price list "items".

Now, when I try to do a vlookup function on a cell within Sheet1, I
come up with a price regardless of whether that cell is blank or has a
zero in it. My function looks like this: =VLOOKUP(Sheet1!A1,items,2)

How can I stop excel interpreting blank cells as cells with zeros in
them? Or how can I alter the function so that it doesn't try to match
up a blank cell A1 with a Cell containing 0 in table "items"?

I appreciate your help in advance.

Matthew Dowling



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default How can I avoid a BLANK cell being interpreted as a ZERO?

Doesn't that determine the quality of the match between the test value and
the table, not the resultant value?

I had a similar problem and incoporated an IF clause to test if returned the
price was zero, however you still have the challenge of dealing with missing
values. However maybe zero priced items are missing?


"Tom Ogilvy" wrote in message
...
Try using

=VLOOKUP(Sheet1!A1,items,2,False)

Does this help?

--
Regards,
Tom Ogilvy

matt wrote in message
om...
I have a price list of items on Sheet2 with product codes from 0 to
999 in column A and prices in the adjoining column B. I have called
this price list "items".

Now, when I try to do a vlookup function on a cell within Sheet1, I
come up with a price regardless of whether that cell is blank or has a
zero in it. My function looks like this: =VLOOKUP(Sheet1!A1,items,2)

How can I stop excel interpreting blank cells as cells with zeros in
them? Or how can I alter the function so that it doesn't try to match
up a blank cell A1 with a Cell containing 0 in table "items"?

I appreciate your help in advance.

Matthew Dowling







----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can I avoid a BLANK cell being interpreted as a ZERO?

True, I guess I wasn't clear on the situation. Here is a conditional
formula that worked for me.

=IF(LEN(TRIM(INDEX(items,MATCH(Sheet1!A1,INDEX(ite ms,0,1),0),2)))=0,"",VLOOK
UP(Sheet1!A1,items,2,FALSE))

Should to it.

to suppress #N/A if the lookup value is not found:

=IF(ISNA(MATCH(Sheet1!A1,INDEX(items,0,1),0)),"",I F(LEN(TRIM(INDEX(items,MAT
CH(Sheet1!A1,INDEX(items,0,1),0),2)))=0,"",VLOOKUP (Sheet1!A1,items,2,FALSE))
)

--
Regards,
Tom Ogilvy

Nigel wrote in message
...
Doesn't that determine the quality of the match between the test value and
the table, not the resultant value?

I had a similar problem and incoporated an IF clause to test if returned

the
price was zero, however you still have the challenge of dealing with

missing
values. However maybe zero priced items are missing?


"Tom Ogilvy" wrote in message
...
Try using

=VLOOKUP(Sheet1!A1,items,2,False)

Does this help?

--
Regards,
Tom Ogilvy

matt wrote in message
om...
I have a price list of items on Sheet2 with product codes from 0 to
999 in column A and prices in the adjoining column B. I have called
this price list "items".

Now, when I try to do a vlookup function on a cell within Sheet1, I
come up with a price regardless of whether that cell is blank or has a
zero in it. My function looks like this: =VLOOKUP(Sheet1!A1,items,2)

How can I stop excel interpreting blank cells as cells with zeros in
them? Or how can I alter the function so that it doesn't try to match
up a blank cell A1 with a Cell containing 0 in table "items"?

I appreciate your help in advance.

Matthew Dowling







----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000

Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can I avoid a BLANK cell being interpreted as a ZERO?

I reread you post - This is what you want

=IF(Sheet1!A1="","",VLOOKUP(Sheet1!A1,items,2,FALS E))

--
Regards,
Tom Ogilvy



matt wrote in message
om...
I have a price list of items on Sheet2 with product codes from 0 to
999 in column A and prices in the adjoining column B. I have called
this price list "items".

Now, when I try to do a vlookup function on a cell within Sheet1, I
come up with a price regardless of whether that cell is blank or has a
zero in it. My function looks like this: =VLOOKUP(Sheet1!A1,items,2)

How can I stop excel interpreting blank cells as cells with zeros in
them? Or how can I alter the function so that it doesn't try to match
up a blank cell A1 with a Cell containing 0 in table "items"?

I appreciate your help in advance.

Matthew Dowling



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
decimal number interpreted as a date aa Excel Discussion (Misc queries) 5 July 22nd 09 02:01 PM
Avoid counting Blank cells as "0" micro1000 via OfficeKB.com Excel Worksheet Functions 3 January 19th 09 12:06 PM
How to avoid cell overlapping? Tim Excel Discussion (Misc queries) 5 July 19th 07 11:00 PM
how can avoid considering of blank cells in IF function Lika Excel Worksheet Functions 1 June 12th 06 10:27 AM
excel CSV is interpreted as HTML MikeDb Excel Discussion (Misc queries) 6 December 10th 04 10:35 AM


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