+ Reply to Thread
Results 1 to 9 of 9

Alternate column summation

Hybrid View

  1. #1
    Registered User
    Join Date
    03-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Alternate column summation

    Hi guys,

    I want a formula that can sum alternate columns (starting from AK6 ending HN6) i.e =sum(AK6+AM6+AO6... HN6) thus excluding the ones in between. I also want to exclude the following cells (AW6, AY6, BC6, BE6, CI6, CK6, FY6, GA6, GS6, GU6, HK6, HM6) which will be caught up in the alternate cell summation. So far I've got got something like =SUMPRODUCT((MOD(COLUMN(AK6:HN6),2)*AK6:HN6))
    I'm not very good at Excel, so any help would be appreciated.

    Thanks

    James

  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: Alternate column summation

    =SUMPRODUCT((MOD(COLUMN(AK6:HN6),2))*(AK6:HN6)) works
    "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
    Registered User
    Join Date
    03-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Alternate column summation

    I tried it, but it doesn't seem there just yet... I believe these cells (AW6, AY6, BC6, BE6, CI6, CK6, FY6, GA6, GS6, GU6, HK6, HM6) that I want excluded in the summation, are causing the problem. How can I write a formula that excludes these specific cells in the calculation? Thanks for your help

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

    Re: Alternate column summation

    hn6 is not in every other column starting ak6,
    but why not just subtract them

    =SUMPRODUCT((MOD(COLUMN(AK6:HN6),2))*(AK6:HN6))-SUM(AW6, AY6, BC6, BE6, CI6, CK6, FY6, GA6, GS6, GU6, HK6)

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

    Re: Alternate column summation

    whats in those cells?

  6. #6
    Registered User
    Join Date
    03-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Alternate column summation

    Integers.

    The spreadsheet is in such away I can't remove them... I need the information as independent information, but don't wish for it to be in the row summation. Thanks

  7. #7
    Registered User
    Join Date
    03-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Alternate column summation

    Would that work? I'm on a laptop without Excel at the moment so I can't try it. Thanks for the help thus far

  8. #8
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: Alternate column summation

    For robustness...
    
    =SUMPRODUCT(--(MOD(COLUMN(AK6:HN6)-COLUMN(AK6),2),AK6:HN6)-
        SUM(AW6,AY6,BC6,BE6,CI6,CK6,FY6,GA6,GS6,GU6,HK6,HM6)
    

  9. #9
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Alternate column summation

    why not just:
    =SUM(AK6,AM6,AO6,AQ6.....)
    will be long, BUT,saves the overhead of the sumproduct ?

    EDIT-
    even better, for the first formula of the run, you just have to click the cells,
    =SUM(first cell (then ',') second cell (then ',')...etc...)
    Last edited by dredwolf; 03-24-2013 at 05:04 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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