+ Reply to Thread
Results 1 to 7 of 7

Total cost (hours * rate) across many months where rate changes by range of months

  1. #1
    Registered User
    Join Date
    11-17-2019
    Location
    Northern Virginia
    MS-Off Ver
    Office 365
    Posts
    2

    Total cost (hours * rate) across many months where rate changes by range of months

    Hello and thank you in advance for your advice. I am attempting to create a single formula to calculate the total cost in Column Z (hours * rate) where the rate (B5:E6) varies by a data range (B2:E3) and hours (F5:Y6) cross many months. Depending on the date in F4:Y4, multiply by correct rate and sum all of them together.

    I have been researching sumproduct and arrays like crazy but have not been able to figure it out.

    Capture.PNG
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    Your rates change mid-month. There's no way to know how many hours in Sep occurred before/after the rate change on the 10th.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    =sumproduct(f6:y6*lookup($f$5:$y$5+9,$b$2:e6))
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    That answer is not correct, Tim.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    C
    D
    E
    F
    G
    Z
    AA
    AB
    2
    09/01/18
    09/01/19
    09/01/20
    09/01/21
    3
    4
    Y1 Rate
    Y2 Rate
    Y3 Rate
    Y4 Rate
    May-19
    Dec-20
    Cost
    5
    $5.00
    $7.00
    $10.00
    $15.00
    56
    0
    $ 7,449
    AA5: {=SUMPRODUCT(G5:Z5, INDEX($C5:$F5, N(IF(1, MATCH($G$4:$Z$4, $C$2:$F$2)))))}
    6
    $5.00
    $7.00
    $10.00
    $15.00
    0
    0
    $ 6,596

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    Note that I made the rates change at the beginning of the month.

  7. #7
    Registered User
    Join Date
    11-17-2019
    Location
    Northern Virginia
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Total cost (hours * rate) across many months where rate changes by range of months

    That's it. I knew the first one wasn't correct and my buddies and I were trying to figure it out. I know it's correct and will keep reviewing it to make sure I understand how it works better. I have never used the N function so that, to me, is a key missing piece to the puzzle. Thank you shg.

+ 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. need to calculate interest rate using months not years
    By yeto in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-24-2018, 06:16 AM
  2. Formula to calculate rate over set months
    By robinterrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-25-2017, 01:14 AM
  3. [SOLVED] Rate changes after 40 hours and need to calculate total cost?
    By y_not in forum Excel General
    Replies: 12
    Last Post: 10-06-2015, 12:16 PM
  4. Replies: 1
    Last Post: 05-16-2014, 10:10 AM
  5. Replies: 1
    Last Post: 04-02-2014, 12:27 AM
  6. multiplying a time by an hourly rate to give a total cost
    By adam.dixon in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-10-2012, 05:19 AM
  7. [SOLVED] WHAT IS THE RATE BY MONTHS on A return of investment
    By PAYBACK ON ONVESTMENT in forum Excel General
    Replies: 0
    Last Post: 03-28-2005, 04:06 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