Excel formula puzzle, looking up values based on range

Excellation

New Member
Joined
Feb 1, 2017
Messages
1
Hi all,

I've been breaking my head on creating a formula that calculates values in column Z. I have a reference table that contains data ranges as shown in column C in the reference table. I also have a database where I would like a formula to show me the category number from column B (1,2 or 3) from the reference table based on the values for Jane (column Y) in the database. For example, Jane has value 50 in the database. I then want the formula to go to the reference table and check based on the range (column C; 0-69.1 / 69.1-160.5 / >160.5) in what category value 50 falls (in this case the result would be 1 as the range data specifies the upper limit). Same for Iris where value 0.1 matches reference range 0.1 and then for the formula to show me category 1. One problem is that there aren't always 3 categories to choose from. Sometimes it's only 1 or 2 categories. Does anyone know how to do this using an excel formula?!

Thanks a lot!

Database:
X
Y
Z
Jane
50
1
Iris
0.1
1
Tom
100
3

<tbody>
</tbody>


Reference table:

A
B
C
Jane
1
69.1
Jane
2
160.5
Jane
3
>160.5
Tom
1
9.6
Tom
2
17.9
Tom
3
>17.9
Iris
1
0.1
Iris
2
0.5

<tbody>
</tbody>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi,

A slight change to column C in a reference table is required , see below :

Ctrl+Shift+Enter NOT just Enter

H2 =INDEX($B$2:$B$9,MATCH(MIN(IF(F2=$A$2:$A$9,ABS($C$2:$C$9-G2))),ABS(IF(F2=$A$2:$A$9,$C$2:$C$9-G2)),0))


ABCDEFGH
1ABCXYZ
2Jane169.1Jane501
3Jane2160.5Iris0.11
4Jane3160.6Tom1003
5Tom19.6
6Tom217.9
7Tom318
8Iris10.1
9Iris20.5

<colgroup><col width="70" span="9" style="width:52pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,332
Messages
6,124,313
Members
449,153
Latest member
JazzSingerNL

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top