Looking for IF statement for greater than and less than

WindsorExcel

New Member
Joined
Jan 29, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I’m trying to combine 2 if statements into a single cell.

I have a cell for “mileage” and a cell for “delivery fee”

Min Delivery fee is £100 up to 25 miles. Anything over 25 miles is the min fee plus £1 per mile.

The output should be: any distance up to 25 miles returns £100. Any distance over 25 miles returns £100 + £1 for every mile over.

I’ve written the formulas as:
=IF(I22<=25,(I22-I22)+100)
=IF(I22>=25,(I22-25)*1+100)

both those formulas work in individual cells, but I can’t combine them… I can’t work it out.

I’m trying to create a pricing tool that calculates the fees easily.

If I populate the cell with any miles up to 25 it shows 100 fee. Anything above 25 miles will be the min fee + 1 per mile E.g. 35 miles = 110.

Can anyone help?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this
Excel Formula:
=IF(I22<=25,(I22-I22)+100,IF(I22>25,(I22-25)*1+100))
 
Upvote 0
Solution
Thanks, I’ve tried that. It’s not working. Im banging my head on the wall with this!!

Any other suggestions? I’ve read about and/or statements but can’t work those out either.
 
Upvote 0
What is not working i tested it and it is working
 

Attachments

  • 1674995182553.png
    1674995182553.png
    15 KB · Views: 4
  • 1674995273213.png
    1674995273213.png
    18.6 KB · Views: 4
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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