+ Reply to Thread
Results 1 to 9 of 9

Calculate total sum based on different rate

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Unhappy Calculate total sum based on different rate

    Hi - I need help on attached spreadsheet.

    I'm trying to populate total/sum of salary for a group of people at column B based on working hours at column A. The rate is 350 for the 1st 2 hours and 150 for every subsequent hours.
    I am struggling to find the formula in. Could someone help?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-07-2013
    Location
    apple valley ca
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Calculate total sum based on different rate

    i think this works.. try this .. a bit clunky.. but it seems to work..
    in B2 put

    =IF(A2="","",SUM(IF(A2>=2,2*350,IF(A2<=2,A2*350,"")),IF(A2>=2,SUM(A2-2)*150,IF(A2<=2,IF(A2>=2,2*350,IF(A2<=2,A2-1,""))))))

    then copy down

  3. #3
    Registered User
    Join Date
    12-10-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Unhappy Re: Calculate total sum based on different rate

    Hi - Thanks for responding!

    When i paste the formula the value seems to appear in the lower cell. For example when i paste the formula at B2 the value seems to appear at B3. Weird?

    I tried to verify the formula against manual calculation, they dont match.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Calculate total sum based on different rate

    Hi,

    What is the logic other than you stating that the first 2 hrs the rate is @250 and subsequently @150.

    Why can't you simply multiply the first 2 rows with 250 and the rest with 150 ?

    If this is not the case, post a sample data with the working to understand your requirement clearly.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Calculate total sum based on different rate

    Try this, copied down...
    =IF(A2="",0,IF(A2<=2,350,350+(A2-2)*150))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Contributor
    Join Date
    05-07-2013
    Location
    apple valley ca
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Calculate total sum based on different rate

    now im confused.. because 16 hours would be 2 hours at 350 2*350=700 and 14hours at 150 14*150=2100 700+2100=2800...
    this formula (=IF(A2="",0,IF(A2<=2,350,350+(A2-2)*150)) gives a result of 2450.00 it dosn't seem to be counting for the second hour only the first.... am i missing something??

    ok ok ok.. i just looked again.. you wanted 350 for the first 2 hours NOT 2 hours at 350... sorry. i gave it a try.. lol
    Last edited by xwarlock10x; 12-12-2013 at 03:28 AM.

  7. #7
    Registered User
    Join Date
    12-10-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Thumbs up Re: Calculate total sum based on different rate

    Quote Originally Posted by xwarlock10x View Post
    now im confused.. because 16 hours would be 2 hours at 350 2*350=700 and 14hours at 150 14*150=2100 700+2100=2800...
    this formula (=IF(A2="",0,IF(A2<=2,350,350+(A2-2)*150)) gives a result of 2450.00 it dosn't seem to be counting for the second hour only the first.... am i missing something??

    ok ok ok.. i just looked again.. you wanted 350 for the first 2 hours NOT 2 hours at 350... sorry. i gave it a try.. lol
    Yea its 350 for the first 2 hours. So if 16 hrs;
    First 2hrs - 350 = 350
    Subsequest hrs - 150*14 = 2100

    So > 350 + 2100 = 2450

    Thanks for the try. Appreciate that!

  8. #8
    Registered User
    Join Date
    12-10-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Calculate total sum based on different rate

    Quote Originally Posted by FDibbins View Post
    Try this, copied down...
    =IF(A2="",0,IF(A2<=2,350,350+(A2-2)*150))
    Many thanks buddy, it works as i wanted!

  9. #9
    Registered User
    Join Date
    12-10-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Calculate total sum based on different rate

    Quote Originally Posted by xlbiznes View Post
    Hi,

    What is the logic other than you stating that the first 2 hrs the rate is @250 and subsequently @150.

    Why can't you simply multiply the first 2 rows with 250 and the rest with 150 ?

    If this is not the case, post a sample data with the working to understand your requirement clearly.
    It isnt the rows are the variable contributors, its the rate for the first two hrs and subsequent hrs. The sample data was posted initially.
    Anyway, i got this solved as you can read through the thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to work out rate based on total time and total amount
    By lisaathers in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2013, 06:44 AM
  2. Replies: 8
    Last Post: 10-10-2012, 04:35 AM
  3. How do I calculate total hours by rate of pay?
    By FrankF in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  4. How do I calculate total hours by rate of pay?
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 09:05 AM
  5. [SOLVED] How do I calculate total hours by rate of pay?
    By FrankF in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1