+ Reply to Thread
Results 1 to 3 of 3

Summing cell content in every 6th column

  1. #1
    Registered User
    Join Date
    03-23-2009
    Location
    Ballina, Australia
    MS-Off Ver
    Excel 2013
    Posts
    22

    Unhappy Summing cell content in every 6th column

    Hi all

    I have a range of values which includes six columns headed:

    buy date (BD), buy price (BP), sell date (SD), sell price(SP), profit (P), percentage (%)

    This range of columns repeats to the right so that Buy Date starts in column B and repeats in Col H and Col M and Col S etc. as below:

    Col A.........Col B......Col C.....Col D.....Col E.....Col F.....Col G.....Col H.....Col I.....etc

    Formula.....BD..........BP.........SD.........SP..........P............%..........BD.........BP.......etc

    Is there an elegant formula to:
    a. Only sum the percentages in each row ie every sixth cell in a row starting from Col G,
    b. Find the number of non empty percentage cells to be able to find the average % from a row and place the formula for the average in Col A for each row?

    I have seen Dsum function however it works down columns not across rows. At least that's my understanding. I hope one of the wise ones can enlighten me.

    I thank you in anticipation and look forward to a solution if one exists.

    Regards

    mgerada:

    PS I have asked for summing every sixth column starting in column B maybe there is a formula for summing the nth column starting in column whatever?
    Last edited by mgerada; 08-14-2011 at 10:18 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Summing cell content in every 6th column

    this will sum cols g,m,s...
    =SUMPRODUCT(--(MOD(COLUMN(B1:AA1),6)=1),B1:AA1)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

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

    Re: Summing cell content in every 6th column

    Hi mgerada,

    Find the attached with two possible ways.

    I like Martin's formula but my method is easier. (maybe)
    Attached Files Attached Files
    Last edited by MarvinP; 08-14-2011 at 10:52 AM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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