+ Reply to Thread
Results 1 to 6 of 6

Sum with dynamic range

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    Perth WA
    MS-Off Ver
    2013
    Posts
    5

    Sum with dynamic range

    Hi everyone,

    I'm trying to set up a spreadsheet that will calculate the amount I will earn bi-monthly. I will be paid on the 1st and 16th day of each month. (Just because spreadsheets are fun and I like keeping track of things.)

    At this stage I have:
    Column A: numbers 1-365 (number of days into the contract)
    Column B: dates of the 365 days (this starts from my contract start date)
    Column C: the amount I expect to earn each day, based on a circular roster
    Column D: =IF(OR(DAY(B2)=16,DAY(B2)=1),"Pay-day","") *This column returns "Pay-day" on the 1st and 16th of each month.
    Column E: =IF(D2="Pay-day",MAX($E$2:E2)+1,E2) *This column numbers each pay-period.
    Column F: =IF(D7="Pay-day",SUMIF(E:E,E7,C:C),"") *This is my expected pre-tax pay.

    What I have here already does what I want it to, but I would like to know if it's possible to do this without Column E. Is there a fancy formula that I could use to sum the daily pay amount between the "Pay-day" entries in Column D?

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Sum with dynamic range

    You get better help on your question if you add an excel file, without confidential information.

    Please also add the desired (expected) result (manualy) in you sheet.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    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: Sum with dynamic range

    Hi, welcome to the forum

    Take a look at using sumifS() for this.

    Something like...
    =SUMIFS(C:C,B:B,"<16",B:B,">15")
    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

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Sum with dynamic range

    Hi Himalaya and welcome to the forum,

    I think you can do this problem using a Pivot Table where you group the pay sums by date. When you do this you can specify the number of days between payments. No formulas needed with Pivot Tables.
    See the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    02-02-2015
    Location
    Perth WA
    MS-Off Ver
    2013
    Posts
    5

    Re: Sum with dynamic range

    Thanks for the replies!

    MarvinP, that's a good idea about the PivotTable. Grouping the dates like that won't work for this scenario as I'll be paid on the 1st and 16th of each month (not consistently every 14 days) but I could group by pay-period for a summarised table of payments.

    I've realised that to make the sheet slightly more concise, it's Column D that isn't necessary. I've just hidden the column for now to save changing the formulas in E and F.

    This is a revised version of what I have (with random amounts pasted as values).

    Pay Schedule.xlsx

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Sum with dynamic range

    Hi,

    By adding the Pay Period Column your work looks great to me. Good Job. Yeah for Pivot Tables.

+ 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. Match ComboBox with dynamic range, then add Textbox1 to dynamic range
    By Lasse Moe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 01:26 AM
  2. Dynamic Range Column Chart w/ Dynamic Avg Line (Excel 2007)
    By BrokenBiker in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-04-2012, 11:40 AM
  3. Fill Dynamic Range From Dynamic Source Range
    By goss in forum Excel General
    Replies: 2
    Last Post: 03-06-2012, 12:05 PM
  4. Replies: 2
    Last Post: 02-02-2006, 04:10 PM
  5. select dynamic range with dynamic start point
    By Juli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2005, 08: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