IF greater than and less than value from corresponding data table

dophile

New Member
Joined
Jan 14, 2017
Messages
11
Need Help Urgently!!!!

I have the following:
Miles
Service
Payable

Service
<10
<15
<20
>20
10A
A
2
4
6
1.5
8
B
B
3
6
9
2.0
16
C
C
4
8
12
3.0
22
A
D
5
10
15
4.0
18
D
E
6
12
18
5.0

<tbody>
</tbody>
Need to calculate payable depends on Miles & Services type based on the Miles range. If miles are greater than 20, then additional miles be paid at the 20 miles rate plus miles minus 20 miles * rate. Can someone please help.

I tried with index, match formula but when tried with if formula to check the mileage range to pay can not get the right answer.

Thank you in advance
Don



<colgroup><col span="4"><col><col span="9"></colgroup><tbody>
</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the forum.

From what I can interpret from what you wrote, I think this might get us moving along. Copy C2 downwards.

ABCDEFGHI
1MilesServicePayableService0101520
210A4A2461.5
38B3B3692
416C12C48123
522A1.5D510154
618D15E612185

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet14

Worksheet Formulas
CellFormula
C2=INDEX($F$2:$I$6,MATCH(B2,$E$2:$E$6,0),MATCH(A2,$F$1:$I$1,1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thank you DRSteele for your reply.

However the result is not what I am looking for. Maybe I wasn't clear on what I am looking for

For Service A, Miles 22

if Miles are Less than 10 Pay 2, if Less than 15 Pay 4, if less than 20 pay 6 if greater than 20, pay the amount of 20 plus (miles -20) * 1.50 = ((20+ 2*1.5))=23
 
Upvote 0
Correction for the last example : if greater than 20 miles the amount payable is $6 + (1.5*2) = $9
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,861
Members
449,411
Latest member
adunn_23

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