• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need to calculate the amount payable for Columns A & B matching columns E...H

dophile

New Member
upload_2017-1-15_10-31-19.png

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 miles 20 plus (miles -20) * 1.50 = ((6+ 2*1.5))=9
 
How urgently?
How 10A would give Payable 2? Miles is over 10 and <= 15 ... hmm?
This is one 'sample' of answer ...
Screen Shot 2017-01-15 at 22.05.04.png ... and it would be nicer, if Your Sample File would be Excel-file.
 
Thank you vletm for the reply. I have attached an Excel file. It's urgent and I really mean it. I need to compare these rates to the prevailing rates by tomorrow.

Thank you.
 

Attachments

  • Payable.xlsx
    11.2 KB · Views: 2
Hi:

=IFERROR(IF(A3>20,INDEX($F$3:$I$6,MATCH(B3,$E$3:$E$6,0),MATCH(LOOKUP(A3,$F$2:$H$2,$F$2:$H$2),$F$2:$H$2,0))+(A3-20)*INDEX($I$3:$I$6,MATCH(B3,$E$3:$E$6)),INDEX($F$3:$I$6,MATCH(B3,$E$3:$E$6,0),MATCH(LOOKUP(A3,$F$2:$H$2,$F$2:$H$2),$F$2:$H$2,0))),"")

Is this what you are looking for?

Thanks
 

Attachments

  • Payable.xlsx
    11.6 KB · Views: 2
Another shorter possible………

In C3 copy down :

=LOOKUP(A3,F$2:H$2,INDEX(F$3:H$6,MATCH(B3,E$3:E$6,0),0))+(A3>20)*INDEX(I$3:I$6,MATCH(B3,E$3:E$6,0))*(A3-20)

Regards
Perfect...Thank you so much bosco_yip. Really appreciated it very much.
 
Hi:

=IFERROR(IF(A3>20,INDEX($F$3:$I$6,MATCH(B3,$E$3:$E$6,0),MATCH(LOOKUP(A3,$F$2:$H$2,$F$2:$H$2),$F$2:$H$2,0))+(A3-20)*INDEX($I$3:$I$6,MATCH(B3,$E$3:$E$6)),INDEX($F$3:$I$6,MATCH(B3,$E$3:$E$6,0),MATCH(LOOKUP(A3,$F$2:$H$2,$F$2:$H$2),$F$2:$H$2,0))),"")

Is this what you are looking for?

Thanks
Thank you Nebu, I will try to incorporate your formula and check it later, as I have found bosco_yip's formula shorter and working for me. Appreciate your response.
 
Back
Top