A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

complex lookup



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 07:34 PM posted to microsoft.public.excel.worksheet.functions
Doug
external usenet poster
 
Posts: 616
Default complex lookup

I have a lookup table that I need to reference. based on a 3 digit # such as
"2.22", I need to be able to find the cross section on the lookup table.
Based on numbers across the top and down the left side;
If I have the number 2.22, it will return for me .15 from the table

lookup table (made up values)
.00 .01 .02 .03 .04 ... .09
2.0 .31 .32 .33 .34 .35 ... .50
2.1 .21 .35 .51 .51 .25 ... .85
2.2 .53 .52 .15 .52 .51 ... .81
2.3 .89 .58 .23 .45 .15 ... .15
--
Thank you!
  #2  
Old April 29th, 2010, 07:52 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default complex lookup

Doug wrote:
I have a lookup table that I need to reference. based on a 3 digit # such as
"2.22", I need to be able to find the cross section on the lookup table.
Based on numbers across the top and down the left side;
If I have the number 2.22, it will return for me .15 from the table

lookup table (made up values)
.00 .01 .02 .03 .04 ... .09
2.0 .31 .32 .33 .34 .35 ... .50
2.1 .21 .35 .51 .51 .25 ... .85
2.2 .53 .52 .15 .52 .51 ... .81
2.3 .89 .58 .23 .45 .15 ... .15



http://www.contextures.com/xlFunctio...ml#IndexMatch2

Assuming your table above is in A1:K5, and 2.22 is in A10, try this:

=INDEX($B$2:$K$5,MATCH(ROUND(A10,1),$A$2:$A$5,0),
MATCH(A10-ROUND(A10,1),$B$1:$K$1,0))
  #3  
Old April 29th, 2010, 09:46 PM posted to microsoft.public.excel.worksheet.functions
Doug
external usenet poster
 
Posts: 616
Default complex lookup

I am recieving a #N/A in the field. This is what it looks like now that I
modified it to fit what I am doing. Can you see what may be wrong? $E$8 is
the lookup value and the table is in $P$2:$Z$41.

=INDEX($Q$3:$Z$41,MATCH(ROUND($E$8,1),$P$3:$P$41,0 ),MATCH($E$8-ROUND($E$8,1),$Q$2:$Z$2,0))
--
Thank you!


"Glenn" wrote:

Doug wrote:
I have a lookup table that I need to reference. based on a 3 digit # such as
"2.22", I need to be able to find the cross section on the lookup table.
Based on numbers across the top and down the left side;
If I have the number 2.22, it will return for me .15 from the table

lookup table (made up values)
.00 .01 .02 .03 .04 ... .09
2.0 .31 .32 .33 .34 .35 ... .50
2.1 .21 .35 .51 .51 .25 ... .85
2.2 .53 .52 .15 .52 .51 ... .81
2.3 .89 .58 .23 .45 .15 ... .15



http://www.contextures.com/xlFunctio...ml#IndexMatch2

Assuming your table above is in A1:K5, and 2.22 is in A10, try this:

=INDEX($B$2:$K$5,MATCH(ROUND(A10,1),$A$2:$A$5,0),
MATCH(A10-ROUND(A10,1),$B$1:$K$1,0))
.

  #4  
Old April 29th, 2010, 10:05 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default complex lookup

Doug wrote:
I am recieving a #N/A in the field. This is what it looks like now that I
modified it to fit what I am doing. Can you see what may be wrong? $E$8 is
the lookup value and the table is in $P$2:$Z$41.

=INDEX($Q$3:$Z$41,MATCH(ROUND($E$8,1),$P$3:$P$41,0 ),MATCH($E$8-ROUND($E$8,1),$Q$2:$Z$2,0))



If MATCH is unsuccessful in finding a match, it returns the #N/A error value.

Make sure that what looks like a number is actually a number (and not text) in
cell E8, column P and row 2.

One way to convert them would be to copy a blank cell, select the values in
question, then Edit / Paste Special / Values / Add / OK. This will not change
cells that are already numbers.
  #5  
Old April 29th, 2010, 11:44 PM posted to microsoft.public.excel.worksheet.functions
Doug
external usenet poster
 
Posts: 616
Default complex lookup

Not sure why it is not working. Everything you said makes sense, I went back
and checked all the number formats, etc. I will just have to play around and
maybe look up the details to the functions you gave me. You have helped a
great deal.
--
Thank you!


"Glenn" wrote:

Doug wrote:
I am recieving a #N/A in the field. This is what it looks like now that I
modified it to fit what I am doing. Can you see what may be wrong? $E$8 is
the lookup value and the table is in $P$2:$Z$41.

=INDEX($Q$3:$Z$41,MATCH(ROUND($E$8,1),$P$3:$P$41,0 ),MATCH($E$8-ROUND($E$8,1),$Q$2:$Z$2,0))



If MATCH is unsuccessful in finding a match, it returns the #N/A error value.

Make sure that what looks like a number is actually a number (and not text) in
cell E8, column P and row 2.

One way to convert them would be to copy a blank cell, select the values in
question, then Edit / Paste Special / Values / Add / OK. This will not change
cells that are already numbers.
.

  #6  
Old April 30th, 2010, 06:07 AM posted to microsoft.public.excel.worksheet.functions
David Heaton[_2_]
external usenet poster
 
Posts: 7
Default complex lookup

On Apr 30, 8:44*am, Doug wrote:
Not sure why it is not working. Everything you said makes sense, I went back
and checked all the number formats, etc. I will just have to play around and
maybe look up the details to the functions you gave me. *You have helped a
great deal.
--
Thank you!



"Glenn" wrote:
Doug wrote:
I am recieving a #N/A in the field. This is what it looks like now that I
modified it to fit what I am doing. Can you see what may be wrong? $E$8 is
the lookup value and the table is in $P$2:$Z$41.


=INDEX($Q$3:$Z$41,MATCH(ROUND($E$8,1),$P$3:$P$41,0 ),MATCH($E$8-ROUND($E$8,1*),$Q$2:$Z$2,0))


If MATCH is unsuccessful in finding a match, it returns the #N/A error value.


Make sure that what looks like a number is actually a number (and not text) in
cell E8, column P and row 2.


One way to convert them would be to copy a blank cell, select the values in
question, then Edit / Paste Special / Values / Add / OK. *This will not change
cells that are already numbers.
.- Hide quoted text -


- Show quoted text -


This isnt going to help you much but the formula isnt working because
despite appearances, the MATCH function doesnt think $E$8-ROUND($E
$8,1) matches the value in your table.

I cant think why not. If you seperate the formula out and do A1=B1
(being the round function alone and the number in your grid) excel
returns TRUE, so the values are the same. It must be something about
the MATCH function

regards


David
  #7  
Old April 30th, 2010, 02:06 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default complex lookup

Doug wrote:
Not sure why it is not working. Everything you said makes sense, I went back
and checked all the number formats, etc. I will just have to play around and
maybe look up the details to the functions you gave me. You have helped a
great deal.



Did you just check the number formats, or did you actually confirm that there
are numbers in the cells, following the directions I gave previously?

Also, make sure that the numbers exactly match what you expect them to be, for
example make sure it is .02 in the cell and not .020000001 formatted to show
only 2 decimal places.
  #8  
Old May 2nd, 2010, 11:41 PM posted to microsoft.public.excel.worksheet.functions
David Heaton[_2_]
external usenet poster
 
Posts: 7
Default complex lookup

On Apr 30, 11:06*pm, Glenn wrote:
Doug wrote:
Not sure why it is not working. Everything you said makes sense, I went back
and checked all the number formats, etc. I will just have to play around and
maybe look up the details to the functions you gave me. *You have helped a
great deal.


Did you just check the number formats, or did you actually confirm that there
are numbers in the cells, following the directions I gave previously?

Also, make sure that the numbers exactly match what you expect them to be, for
example make sure it is .02 in the cell and not .020000001 formatted to show
only 2 decimal places.


Glenn / Doug

The only way I managed to get this to work, was to make sure
'Precision as displayed' was selected in the OPTIONS.

the ROUND function is causing the MATCH function to fail, this seems
to resolve the problem

Regards

David
  #9  
Old May 3rd, 2010, 02:47 PM posted to microsoft.public.excel.worksheet.functions
Bernd P
external usenet poster
 
Posts: 613
Default complex lookup

Hello Doug,

Array-enter
=INDEX(Q3:Z41,MATCH(TEXT(FLOOR(E8,0.1),"0.0"),TEXT (P3:P41,"0.0"),
0),MATCH(TEXT(MOD(E8,0.1),".00"),TEXT(Q2:Z2,".00") ,0))

Regards,
Bernd
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.