+ Reply to Thread
Results 1 to 6 of 6

Summing every three values in row

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Wamberal Australia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Summing every three values in row

    Hi. I hope someone can help me. I am going around in circles. I can create a manual formula which I have to update each month, but I want to automate once I select a new month.

    I have a spreadsheet which has columns of data per month. I want to sum the year to date totals for ordinary time, time and a half and double time. I have used the index function for the month however as the year progresses I want to track the year to date figure.

    I hope my note has not confused the issue to much and trust that the spreadsheet is more self explanatory than my words. In essence for the Month of October, the year to date std time hours should be the sum of cells D10, G10, J10 and M10.

    Can anyone help with a formula in essence to sum every third column which expands and the year progresses.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Summing every three values in row

    Hi

    I think you will need to build a custom function for this.

    Give me a while, I have something in mind.

    BRB.

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

    Re: Summing every three values in row

    Hi Sambridge and welcome to the forum,

    I see a lot of these kinds of problems where people create a table to save time in typing. If you create a better table (more typing sometimes) the problem gets easy. Look at my new sheet, where I've created a different structure table and then a Pivot Table to display the data you want. I didn't need any formulas to arrive at my Pivot Table answer. See if this type on structure will work for you.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Summing every three values in row

    I would go with Marvin's suggestion first but if you are stuck with what you have.

    Assuming we are going out to Column AM
    For Standard
    =SUMPRODUCT(--(ISNUMBER($D$8:$AM$8)), --($D$8:$AM$8<($D$4+31)),$D$10:$AM$10)

    For Time and a half
    =SUMPRODUCT(--(ISNUMBER($D$8:$AM$8)), --($D$8:$AM$8<($D$4+31)),$E$10:$AN$10)
    notice, the columns to sum are moved one to the right ("E10:AN10)

    and for double time (same idea)
    =SUMPRODUCT(--(ISNUMBER($D$8:$AM$8)), --($D$8:$AM$8<($D$4+31)),$F$10:$AO$10)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Summing every three values in row

    My Custom Function Seems to work:

    I have called it StepSum. It is designed to sum the cells in a range but with the inclusion of a step.

    so

    Please Login or Register  to view this content.
    will count every third cell horizontally

    I wrote it to work vertically to

    so

    Please Login or Register  to view this content.
    should count every third cell vertically

    And

    Please Login or Register  to view this content.
    Sould work horizontally and vertically.



    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 08-25-2013 at 12:03 PM. Reason: Fault Clearred. Debugged.

  6. #6
    Registered User
    Join Date
    07-16-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Summing every three values in row

    I think you want this type of formula in Cell AO10;;;;;;;;;

    =SUM(IF(MOD(COLUMN($D10:$AM10)-1,3)=0,1,0)*($D10:$AM10))
    this is an array formula, so pls use CSE(ctrl+shift+entre) in cell

+ 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. [SOLVED] Summing values in one column based on their adjacent values
    By undoubtedlymegz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2013, 04:57 PM
  2. Summing Values after Finding Max Consecutive Values
    By pipsturbo in forum Excel General
    Replies: 6
    Last Post: 05-12-2009, 08:06 PM
  3. Summing matrix values based on X & Y axis values
    By vtbigmac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2009, 01:29 PM
  4. [SOLVED] summing values in one row based on values in another row
    By Bert in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-26-2006, 04:45 PM
  5. searching for values and summing the corresponding values
    By Simon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2005, 09: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