Search code examples
google-sheetsgoogle-sheets-formulaformulamultiplication

Google Sheets formula for calculating and multiplying data ranges


Thank you in advance for your attention.

I'm attempting to create a spreadsheet that tracks employee hours on different aspects of a project. One employee is paid $250 daily. If this employee spends 1-8hrs on something = $250. If they spend 17-24hrs on something = $750. I don't want to track it hourly at $31.25hr.

Here's what I'm thinking but I cant get it to work:

=IF(isbetween(A1,1,8),C5*1)

C5 in this example is a cell that holds the number 250 so I can multiply (C5 * 1) or (C5 * 4) etc, based on the multiple of eight hour ranges worked. This formula by itself works fine. Though I would like to chain them together like this:

=IF(isbetween(A1,1,8),C5 * 1) AND =IF(isbetween(A1,9-16),C5 * 2) AND =IF(isbetween(A1,17,24),C5 *3 ) ....

I imagine you can't chain them this way, but is there another way to get the same effect?

Thank you again for your time!


Solution

  • Add value to the results cell by $250.

    You can use this formula to get your desired output. =IF(B1 < 9, C$5, IF ( B1 < 17, (C$5 * 2),(C$5 * 3)))

    Sample Result:

    enter image description here

    References:

    If