Formula Help

Utradeshow

Well-known Member
Joined
Apr 26, 2004
Messages
769
Hi Guy's i have this spreadsheet that i need help with. The INPUT cells are F2 and G2.
I need the formula in cell in I2. Would it better to do a macro? for this result?
If Miles 1-400 and G = 1 then 15%
If Miles 1-400 and G = 2 then 8.5%
If miles 401-600 and G = 1 then 20.2%
IF Miles 401-600 and G= 2 then 13%
If Miles 601 > and G = 1 or 2 then 13%
If G = 3 then 0%
BVL Accrual Master.xls
ABCDEFGHI
1NameLoadDateWaybillCOD=1DOD=2CORP=3D&E=4RatedNetLinehaulMilesSelfHaul=1Booker/OA=2HaulerOnly=3BookingBkg%
2$0.00
3
4IfMiles1-400andG=1then15%
5IfMiles1-400andG=2then8.5%
6Ifmiles401-600andG=1then20.2%
7IFMiles401-600andG=2then13%
8IfMiles601>andG=1or2then13%
9IfG=3then0%
10
Waybill Detail
[/code]
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
try this formula and change the number formating of column I to "percantage":

=IF(AND(F2>=1, F2<=400), IF(G2=1, 15%, IF(G2=2, 8.5%, "")), IF(AND(F2>=401, F2<=600), IF(G2=1, 20.2%, IF(G2=2, 13%, "")), IF(AND(F2>=601, OR(G2=1, G2=2)), 13%, IF(G2=3, 0%, ""))))
 
Upvote 0
If you create a table with the mileages and possible values for G2 and insert the relevant percentages like below.....
Book1
ABCDEFGHIJ
1Miles123
2015%8.50%0%521120.20%
340120.20%13%0%
460113%13%0%
5
Sheet3


Formula in I2

=INDEX($B$2:$D$4,MATCH(F2,A$2:A$4),MATCH(G2,B$1:D$1,0))
 
Upvote 0
try this formula and change the number formating of column I to "percantage":

=IF(AND(F2>=1, F2<=400), IF(G2=1, 15%, IF(G2=2, 8.5%, "")), IF(AND(F2>=401, F2<=600), IF(G2=1, 20.2%, IF(G2=2, 13%, "")), IF(AND(F2>=601, OR(G2=1, G2=2)), 13%, IF(G2=3, 0%, ""))))


This works GREAT... Thank you SO Much
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,132
Members
448,947
Latest member
test111

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