Google Sheets – How to Create a Complex Sum Function

formulasgoogle sheets

Apologies if this is lame, but I can't get a proper value using =SUM to perform order of operations on an employees hours (he has gotten two raises since starting after surpassing expectations). The notes on the cells denotes a pay increase, the first one is a start.

I tried this formula:

=SUM((F15*20)+(F16:F20*25)+(F21:F23*30))

but that returns an error. What am I doing wrong to get the sum of all the hours multiplied by their correct hourly wage?

sheets column

Best Answer

If you have multiple sums in the formula, you need multiple SUM commands, one for each sum. That is,

=F15*20+SUM(F16:F20)*25+SUM(F21:F23)*30

Have to add things up before multiplying them all by a common factor.