Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dmbRedGetta
 
Posts: n/a
Default VLOOKUP #N/A Sometimes but not always

Hey all,

I have an assignment I'm working on for school and I have a formula using
VLOOKUP. In the assignment, we're looking up a discount rate based on the
customer's credit score. The credit scores are in the first column and the
discount rates are in the next four columns (the region number - 109 yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22), 2)

I've gotten it to work using "487" instead of the $C22, so I thought maybe
the type of data in the cell would make a difference, but that doesn't seem
to change anything. All cells are numbers, so I thought it should work.
There is no difference (that I can see) from the rows that work and the rows
that don't. Any ideas would be greatly appreciated!
  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

Probably not all C cells are numbers, although they may look like numbers.
You can test this using the USNUMBER() function and you can correct it:
Format a blank cell as Number. Enter 1. EditCopy. Select your C cells.
Edit, Paste Special, check Multiply. OK.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"dmbRedGetta" wrote in message
...
Hey all,

I have an assignment I'm working on for school and I have a formula using
VLOOKUP. In the assignment, we're looking up a discount rate based on the
customer's credit score. The credit scores are in the first column and
the
discount rates are in the next four columns (the region number - 109
yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22),
2)

I've gotten it to work using "487" instead of the $C22, so I thought maybe
the type of data in the cell would make a difference, but that doesn't
seem
to change anything. All cells are numbers, so I thought it should work.
There is no difference (that I can see) from the rows that work and the
rows
that don't. Any ideas would be greatly appreciated!



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

Typo alert...

USNUMBER()
should be:
IsNumber()




Niek Otten wrote:

Probably not all C cells are numbers, although they may look like numbers.
You can test this using the USNUMBER() function and you can correct it:
Format a blank cell as Number. Enter 1. EditCopy. Select your C cells.
Edit, Paste Special, check Multiply. OK.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"dmbRedGetta" wrote in message
...
Hey all,

I have an assignment I'm working on for school and I have a formula using
VLOOKUP. In the assignment, we're looking up a discount rate based on the
customer's credit score. The credit scores are in the first column and
the
discount rates are in the next four columns (the region number - 109
yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22),
2)

I've gotten it to work using "487" instead of the $C22, so I thought maybe
the type of data in the cell would make a difference, but that doesn't
seem
to change anything. All cells are numbers, so I thought it should work.
There is no difference (that I can see) from the rows that work and the
rows
that don't. Any ideas would be greatly appreciated!


--

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

You hit the nail on the head. Why would they all look like they were numbers
when I highlight them and go to "format cells" but obviously they weren't?

Is there any way for a cell to be formatted as a number but display nothing
(i.e. don't show the 0)?

Thanks for all your help!

Matt

"Niek Otten" wrote:

Probably not all C cells are numbers, although they may look like numbers.
You can test this using the USNUMBER() function and you can correct it:
Format a blank cell as Number. Enter 1. EditCopy. Select your C cells.
Edit, Paste Special, check Multiply. OK.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"dmbRedGetta" wrote in message
...
Hey all,

I have an assignment I'm working on for school and I have a formula using
VLOOKUP. In the assignment, we're looking up a discount rate based on the
customer's credit score. The credit scores are in the first column and
the
discount rates are in the next four columns (the region number - 109
yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22),
2)

I've gotten it to work using "487" instead of the $C22, so I thought maybe
the type of data in the cell would make a difference, but that doesn't
seem
to change anything. All cells are numbers, so I thought it should work.
There is no difference (that I can see) from the rows that work and the
rows
that don't. Any ideas would be greatly appreciated!




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

If you format a cell as text, then the value typed into that cell will be
treated as text--even if you type digits. If you start your entry with an
apostrophe ('123), then that will be treated as text.

It's very nice if you were typing a string of numbers that won't ever be
added--Social security numbers, credit card numbers and the like.

By the way, if those "text numbers" cells were just changed to Genera (or
another number format), then that's the not enough to change the value in the
cell. That's why Niek suggested the copy|paste special bit.

And you could hide 0's by using
format|conditional formatting
(If it's equal to 0, make the font color match the fill color)

or you could use a custom format of:
0;-0;;@
positive numbers;negative numbers;zero;text



dmbRedGetta wrote:

You hit the nail on the head. Why would they all look like they were numbers
when I highlight them and go to "format cells" but obviously they weren't?

Is there any way for a cell to be formatted as a number but display nothing
(i.e. don't show the 0)?

Thanks for all your help!

Matt

"Niek Otten" wrote:

Probably not all C cells are numbers, although they may look like numbers.
You can test this using the USNUMBER() function and you can correct it:
Format a blank cell as Number. Enter 1. EditCopy. Select your C cells.
Edit, Paste Special, check Multiply. OK.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"dmbRedGetta" wrote in message
...
Hey all,

I have an assignment I'm working on for school and I have a formula using
VLOOKUP. In the assignment, we're looking up a discount rate based on the
customer's credit score. The credit scores are in the first column and
the
discount rates are in the next four columns (the region number - 109
yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22),
2)

I've gotten it to work using "487" instead of the $C22, so I thought maybe
the type of data in the cell would make a difference, but that doesn't
seem
to change anything. All cells are numbers, so I thought it should work.
There is no difference (that I can see) from the rows that work and the
rows
that don't. Any ideas would be greatly appreciated!





--

Dave Peterson


  #6   Report Post  
Niek Otten
 
Posts: n/a
Default

Thanks, Dave!

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"Dave Peterson" wrote in message
...
Typo alert...

USNUMBER()
should be:
IsNumber()




Niek Otten wrote:

Probably not all C cells are numbers, although they may look like
numbers.
You can test this using the USNUMBER() function and you can correct it:
Format a blank cell as Number. Enter 1. EditCopy. Select your C cells.
Edit, Paste Special, check Multiply. OK.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"dmbRedGetta" wrote in message
...
Hey all,

I have an assignment I'm working on for school and I have a formula
using
VLOOKUP. In the assignment, we're looking up a discount rate based on
the
customer's credit score. The credit scores are in the first column and
the
discount rates are in the next four columns (the region number - 109
yields a
column number of 2 through 5, which explains the $D22-109 part of the
formula). Here is the formula:

=ROUND(IF($C22=0,0,((VLOOKUP($C22,$A$7:$E$13,$D22-109,TRUE))*$D$16)*$E22),
2)

I've gotten it to work using "487" instead of the $C22, so I thought
maybe
the type of data in the cell would make a difference, but that doesn't
seem
to change anything. All cells are numbers, so I thought it should
work.
There is no difference (that I can see) from the rows that work and the
rows
that don't. Any ideas would be greatly appreciated!


--

Dave Peterson



  #7   Report Post  
Posted to microsoft.public.excel.misc
DMB
 
Posts: n/a
Default VLOOKUP #N/A Sometimes but not always

Anouther way to get rid of the 0s is through the TOOLS-OPTIONS-VIEW-WINDOWS
OPTIONS-0 OPTIONS checkbox. This works on the whole sheet for all I know. We
hide all the 0s.

PS. The last two menu items are a part of the OPTIONS window at the bottom.

GL
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default making a cell zero

it is a stupid question but how do you make a cell in excel a zero when it is
a negative calculation and then that same cell to display the positive numbers
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 using a cell calculated with NOW returns Error Chris Berding Excel Worksheet Functions 2 August 21st 05 04:22 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 07:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 05:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 01:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 11:43 AM


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