Better Ways Instead Using Lookup Value

RudRud

Active Member
Joined
Feb 2, 2023
Messages
275
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
Hi All, I'm new here and im not a native here.

I got rules below that need to convert into formula.

I'm currently using lookup value (refer to B3 Formula) and i require to manual add my own statements in D2:F7 order to achieve the lookup value.

I'd like to know if got any other formula in more conveniece way?

Thank You ~

1677385457660.png



Book1
ABCDEFGHI
1My Formula Creation:
2100500100%
3200.6909990%
4353.33331808980%
553.333330.6707970%
676.666670.706960%
7
8
9
10Rules:
11
12
13
14
15
16
17
18
19
20
21
Sheet1
Cell Formulas
RangeFormula
E3:E5E3=D2-1
B3:B6B3=LOOKUP(2,1/((A3>=$D$2:$D$6)*(A3<=$E$2:$E$6)),$F$2:$F$6)
 

Attachments

  • 1677385433793.png
    1677385433793.png
    22.7 KB · Views: 2

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the MrExcel board!

I'm not certain what you are asking, but a lookup table like you have is a good idea. You could try this bit simpler formula though.

23 02 26.xlsm
ABCDEF
1My Formula Creation:
2100500100%
32060%909990%
4353.3333333100%808980%
553.3333333360%707970%
676.6666666770%06960%
XLOOKUP
Cell Formulas
RangeFormula
E3:E5E3=D2-1
B3:B6B3=XLOOKUP(A3,D$2:D$6,F$2:F$6,,-1)
 
Upvote 0
You could try this bit simpler formula though.
.. or this one that will do all the lookups with a single formula in B3 only

For both of my suggestions, column E is not actually required, you just need the bottom value of each range & the relevant %

23 02 26.xlsm
ABCDEF
1My Formula Creation:
2100500100%
32060%909990%
4353.3333333100%808980%
553.3333333360%707970%
676.6666666770%06960%
XLOOKUP
Cell Formulas
RangeFormula
B3:B6B3=XLOOKUP(A3:A6,D2:D6,F2:F6,,-1)
E3:E5E3=D2-1
Dynamic array formulas.
 
Upvote 1
Solution
.. or this one that will do all the lookups with a single formula in B3 only

23 02 26.xlsm
ABCDEF
1My Formula Creation:
2100500100%
32060%909990%
4353.3333333100%808980%
553.3333333360%707970%
676.6666666770%06960%
XLOOKUP
Cell Formulas
RangeFormula
B3:B6B3=XLOOKUP(A3:A6,D2:D6,F2:F6,,-1)
E3:E5E3=D2-1
Dynamic array formulas.

Absolutely brilliant

Never thought that before, i dont need to manual fill the column E again in order to fit lookupvalue.

i have a lot situation like this, Again, Thanks so much fo your kind help :)
 
Upvote 0
You are very welcome. Thanks for the follow-up. :)
 
Upvote 0
u don't necessarily need lookup for this just use boolean.
Excel Formula:
=MAX((A3>=$D$2:$D$6)*(A3<=$E$2:$E$6)*$F$2:$F$6)
 

Attachments

  • 1677408493124.png
    1677408493124.png
    25 KB · Views: 4
Upvote 1

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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