Search Value by Range

excelrooki

New Member
Joined
Jun 4, 2014
Messages
2
ABCDEFG
1BalanceFee IDService FeeFee IDFrom BalTo BalService Fee
2$112.3411$0$499.99$10
3$112.3421$500$1,499.99$20
4$1234.2112$0$499.99$5
5$342.1222$500$1,299.99$15
6$785.8722$1,300$1,499.99$25

<tbody>
</tbody>

I need some help calculating the service fee based on the Balance and the Fee ID.

Example:
C2 should have a value of $10 since A2 is $112.34 and Fee Id is 1,
C3 should have a value of $5 since Balance is $112.34 and Fee ID is 2.
C4 should have a value of $20 since A4 is $1234.21 and Fee ID is 1

Thanks,
Jason
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Formula in C2 copied down:


Excel 2010
ABCDEFG
1BalanceFee IDService FeeFee IDFrom BalTo BalService Fee
2112.3411010499.9910
3112.342515001,499.9920
41234.2112020499.995
5342.122525001,299.9915
6785.8721521,3001,499.9925
Sheet1
Cell Formulas
RangeFormula
C2=INDEX(G$2:G$6,MATCH(1,INDEX((D$2:D$6=B2)*(E$2:E$6<=A2)*(F$2:F6>=A2),),FALSE))
 
Upvote 0
This in C2 and drag down
Code:
=IF(AND(B2=1,A2<500),10,IF(AND(B2=2,A2<500),5,IF(AND(B2=1,A2<1500),20,IF(AND(B2=2,A2<1500),15,25))))
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,923
Members
449,479
Latest member
nana abanyin

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