Formula in Excel

Occasional Visitor

I know the basics in creating some formulas I'm trying to create a spread sheet for mileage that if someone has up to 1500km it is charged at a specific rate ,  and in another column I want anything above 1500 charge at a separate rate can someone please provide some ideas on how to create those formulas

3 Replies
Perhaps, you need a formula like this:

For the data structured like this


if in B1 is your rate for the mileage below 1500, and in C1 - above it, you may use formulas

in B2:

in C2:

in D2:

and drag them down till end of your range

If the charge per km for the first 1500 km is 20 and the charge per km for the excess over 1500 km is 25, such would be similar to a tax table wherein the formula, assuming the distance is in A6, would be:
Instead of the array constants, cell references should be used, such that {0;1500} should be entered in, and referred to as, B$2:B$3, {0;30000} should be entered in, and referred to as, C$2:C$3, and {20;25} should be entered in, and referred to as, D$2:D$3.
Thus, the same formula using cell references instead of array constants would be:
Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
23 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies