1 Comment

I asked the same question of a CharGPT 3.5 app for iPad. The response shows we ain’t there yet.

Me: How would I use SUMPRODCUT to build a sliding fee schedule in Excel?

CGPT: To create a sliding fee schedule using SUMPRODUCT in Excel, you can use it to calculate the fee based on specified criteria. For example, let's say you have quantities in column A and corresponding fees in column B. You want to apply different rates for different quantity ranges.

Assuming your quantity ranges are in cells D2:D4 (e.g., 1-10, 11-20, 21-30), and corresponding rates are in E2:E4, you can use the following formula:

```excel

=SUMPRODUCT((A2>=D2:D4)*(A2<=E2:E4),B2:B4)

```

This formula checks if the quantity in cell A2 falls within any of the specified ranges and then multiplies the corresponding fee by 1 (if true) or 0 (if false). Finally, it sums up the results, giving you the calculated fee based on the sliding fee schedule.

Adjust the cell references according to your specific data.

me: Show me a numerical example

CGPT: Certainly! Let's say you have the following data in your Excel sheet:

- Quantity in cell A2: 15

- Quantity ranges in cells D2:D4: 1, 11, 21

- Corresponding rates in cells E2:E4: $5, $4, $3

- Fees in cells B2:B4: $50, $40, $30

Now, you can use the SUMPRODUCT formula:

```excel

=SUMPRODUCT((A2>=D2:D4)*(A2<=E2:E4),B2:B4)

```

Substitute the values into the formula:

```excel

=SUMPRODUCT((15>=1)*(15<=11), $50, (15>=11)*(15<=21), $40, (15>=21)*(15<=30), $30)

```

This simplifies to:

```excel

=0 + 50 + 0 = $50

```

So, based on the sliding fee schedule, the fee for a quantity of 15 would be $50. Adjust the ranges and values according to your specific scenario.

Me: Are you sure that example shouldn’t be $40

CGPT: Apologies for the oversight. Let's reassess the example:

Given the quantity (15), we need to find the applicable range and corresponding fee. In this case:

- \(15\) falls between \(11\) and \(21\),

- The corresponding fee is \(40\).

So, you are correct. The fee for a quantity of \(15\) should indeed be \(40\), not \(50\). I appreciate your attention to detail. If you have further questions or if there's anything else you'd like assistance with, feel free to let me know!

Expand full comment