Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Parker
 
Posts: n/a
Default Vlookup Function Problem

I'm using Office 2000 Professional and I have a vlookup function that works
in most cases, but not for some. I have a formula for a discount factor and
a formula that rounds that factor to the nearest 0.5%. I then look up that
result in a table but there are six values that it does not find (-17.5%,
-20.5%, -23.5%, -28.5%, -34.5% and -35.0%) Any ideas why it cannot find
these certain values in the lookup range and is there any way to fix this?

To see the problem, put the following info & formulas into a blank worksheet:
Cell A1 - "11111"
Cell A2 - "-500"
Cell A3 - "-450"
Cell B2 - "=A2/A$1"
Cell C3 - "=IF(B2<0,MROUND(ABS(B2),0.005),-MROUND(B2,0.005))"
Cell D2 - "=IF(C25%,18.5%,IF(C2<-40%,0, VLOOKUP(C2,I$2:J$92,2,FALSE)))"
Copy cells B2 thru D2 down one line
Fill Down A2 to D3 thru row #102
Cell I2 - "5.0%"
Cell I3 - "4.5%"
Cell J2 - "18.250%"
Cell J3 - "18.125%"
Fill Down I2 to J3 thru row #92

Thanks in advance for any help,

Parker
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Parker

i'm a bit confused - firstly as in your example you have
B2, C3, D2
do you mean B2, C2, D2 ???

secondly, when i assume you mean B2, C2, D2, when i fill down to C3, D3 i
get
0.0405 in C3 - which returns a #N/A error - which is expected as this value
is not in column I

have i mis-understood the example or the problem?

Cheers
JulieD

"Parker" wrote in message
...
I'm using Office 2000 Professional and I have a vlookup function that
works
in most cases, but not for some. I have a formula for a discount factor
and
a formula that rounds that factor to the nearest 0.5%. I then look up
that
result in a table but there are six values that it does not find (-17.5%,
-20.5%, -23.5%, -28.5%, -34.5% and -35.0%) Any ideas why it cannot find
these certain values in the lookup range and is there any way to fix this?

To see the problem, put the following info & formulas into a blank
worksheet:
Cell A1 - "11111"
Cell A2 - "-500"
Cell A3 - "-450"
Cell B2 - "=A2/A$1"
Cell C3 - "=IF(B2<0,MROUND(ABS(B2),0.005),-MROUND(B2,0.005))"
Cell D2 - "=IF(C25%,18.5%,IF(C2<-40%,0, VLOOKUP(C2,I$2:J$92,2,FALSE)))"
Copy cells B2 thru D2 down one line
Fill Down A2 to D3 thru row #102
Cell I2 - "5.0%"
Cell I3 - "4.5%"
Cell J2 - "18.250%"
Cell J3 - "18.125%"
Fill Down I2 to J3 thru row #92

Thanks in advance for any help,

Parker



  #3   Report Post  
Parker
 
Posts: n/a
Default

Sorry, it is supposed to be B2, C2, D2. Everything else is accurate.

The result in C3 should be 0.04. (Verify the MRound formula, you may have
one too many zeros in the 0.005). One other item of note, you must have the
Analysis ToolPak installed for MRound to work. (Tools, Add-Ins, Analysis
ToolPak).

I did get it to work if I use a similiar MRound function in the lookup table
section (Copy column I to column H and enter the following formula into cell
I2 and drag it down to I92:=IF(H2<0,-MROUND(ABS(H2),0.005),MROUND(H2,0.005)).
This basically guarantees that the value to lookup will match a value in the
lookup section, but I shouldn't have to do that...

Again, Thanks in advance for any help or suggestions.

Parker


"JulieD" wrote:

Hi Parker

i'm a bit confused - firstly as in your example you have
B2, C3, D2
do you mean B2, C2, D2 ???

secondly, when i assume you mean B2, C2, D2, when i fill down to C3, D3 i
get
0.0405 in C3 - which returns a #N/A error - which is expected as this value
is not in column I

have i mis-understood the example or the problem?

Cheers
JulieD

"Parker" wrote in message
...
I'm using Office 2000 Professional and I have a vlookup function that
works
in most cases, but not for some. I have a formula for a discount factor
and
a formula that rounds that factor to the nearest 0.5%. I then look up
that
result in a table but there are six values that it does not find (-17.5%,
-20.5%, -23.5%, -28.5%, -34.5% and -35.0%) Any ideas why it cannot find
these certain values in the lookup range and is there any way to fix this?

To see the problem, put the following info & formulas into a blank
worksheet:
Cell A1 - "11111"
Cell A2 - "-500"
Cell A3 - "-450"
Cell B2 - "=A2/A$1"
Cell C3 - "=IF(B2<0,MROUND(ABS(B2),0.005),-MROUND(B2,0.005))"
Cell D2 - "=IF(C25%,18.5%,IF(C2<-40%,0, VLOOKUP(C2,I$2:J$92,2,FALSE)))"
Copy cells B2 thru D2 down one line
Fill Down A2 to D3 thru row #102
Cell I2 - "5.0%"
Cell I3 - "4.5%"
Cell J2 - "18.250%"
Cell J3 - "18.125%"
Fill Down I2 to J3 thru row #92

Thanks in advance for any help,

Parker




  #4   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

When you drag the fill handle to create the series, some of the numbers
aren't what you expect. If you increase the number of decimals in the
lookup table, you'll see the differences.

The following post by Rob Bovey may help you solve the problem:

http://groups.google.ca/groups?&selm...%40cppssbbsa04

Parker wrote:
Sorry, it is supposed to be B2, C2, D2. Everything else is accurate.

The result in C3 should be 0.04. (Verify the MRound formula, you may have
one too many zeros in the 0.005). One other item of note, you must have the
Analysis ToolPak installed for MRound to work. (Tools, Add-Ins, Analysis
ToolPak).

I did get it to work if I use a similiar MRound function in the lookup table
section (Copy column I to column H and enter the following formula into cell
I2 and drag it down to I92:=IF(H2<0,-MROUND(ABS(H2),0.005),MROUND(H2,0.005)).
This basically guarantees that the value to lookup will match a value in the
lookup section, but I shouldn't have to do that...

Again, Thanks in advance for any help or suggestions.

Parker


"JulieD" wrote:


Hi Parker

i'm a bit confused - firstly as in your example you have
B2, C3, D2
do you mean B2, C2, D2 ???

secondly, when i assume you mean B2, C2, D2, when i fill down to C3, D3 i
get
0.0405 in C3 - which returns a #N/A error - which is expected as this value
is not in column I

have i mis-understood the example or the problem?

Cheers
JulieD

"Parker" wrote in message
...

I'm using Office 2000 Professional and I have a vlookup function that
works
in most cases, but not for some. I have a formula for a discount factor
and
a formula that rounds that factor to the nearest 0.5%. I then look up
that
result in a table but there are six values that it does not find (-17.5%,
-20.5%, -23.5%, -28.5%, -34.5% and -35.0%) Any ideas why it cannot find
these certain values in the lookup range and is there any way to fix this?

To see the problem, put the following info & formulas into a blank
worksheet:
Cell A1 - "11111"
Cell A2 - "-500"
Cell A3 - "-450"
Cell B2 - "=A2/A$1"
Cell C3 - "=IF(B2<0,MROUND(ABS(B2),0.005),-MROUND(B2,0.005))"
Cell D2 - "=IF(C25%,18.5%,IF(C2<-40%,0, VLOOKUP(C2,I$2:J$92,2,FALSE)))"
Copy cells B2 thru D2 down one line
Fill Down A2 to D3 thru row #102
Cell I2 - "5.0%"
Cell I3 - "4.5%"
Cell J2 - "18.250%"
Cell J3 - "18.125%"
Fill Down I2 to J3 thru row #92

Thanks in advance for any help,

Parker






--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
carrying a hyper link when using the vlookup function mike Excel Worksheet Functions 1 November 19th 04 03:49 AM
carrying a hyper link when using the vlookup function mike Excel Worksheet Functions 2 November 18th 04 04:22 PM
Excel Problem: VLookup andyp161 Excel Worksheet Functions 1 November 18th 04 12:29 PM
How can I see an example of the vlookup function in excel? Ian G Excel Worksheet Functions 2 November 14th 04 11:34 PM
Regarding IF function or vLOOKUP function wuwu Excel Worksheet Functions 2 November 13th 04 01:38 PM


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

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"