## SUMPRODUCT and nested IF functions

*Article updated on December 12, 2017*

I have demonstrated in a previous post how to simplify nested IF functions, in this article I will show you how to simplify your SUMPRODUCT formulas regarding multiple criteria.

In most cases, there is no need for IF functions in SUMPRODUCT formulas, this is true in this case as well, the criteria below are complicated to build with IF functions.

0 <= value < 100 Rate: 1.01

100 <= value < 200 Rate: 1

200 <= value < 300 Rate: 1.03

300 <= value < 500 Rate: 1

500 <= value < 900 Rate: 1.05

900 <= value Rate: 1

If a value in column B is matching one of the above ranges the corresponding rate is used.

However, it can be easily simplified using the LOOKUP function. The following formula is entered in cell C14 in the image above.

A small table is easy to build, shown in column E and F. The LOOKUP function requires the values in E3:E8 to be sorted in an ascending order for it to work properly.

Instead of using one lookup value in the first argument I am using an entire cell range.

The rate is determined by the value in B3:B12.

The LOOKUP function matches the values in B3:B12 to the values in F3:F8 and returns the corresponding value from G3:G8 simultaneously.

Now we know which rates to use, it is now possible to multiply the amounts.

becomes

and returns

Lastly, the SUMPRODUCT function adds all numbers and returns a total.

and returns 413.4 in cell C14.

So what would the equivalent formula look like using IF functions?

You can use letters also with the LOOKUP function, remember to have them sorted from A to Z, the image above shows you this in F3:F8.

Column D is a column to verify the calculation, you don't need it.

### Download excel *.xlsx file

### Leave a Reply

**How to add a formula to your comment:**

<code>your formula</code>

Remember to convert less than and larger than signs to html character entities before you post your comment.

**How to add VBA code to your comment:**

[vb 1="vbnet" language=","]

VBA code

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org

Add picture link to comment.

**Contact Oscar**

You can contact me through this webpage

## Share this article