+ Reply to Thread
Results 1 to 5 of 5

How can I add non-adjacent cells with a formula

  1. #1
    dhodges00
    Guest

    How can I add non-adjacent cells with a formula

    I have 24 columns. In columns 25 and 26, I want the sum totals of every other
    column to its left. In other words, column 25 would show the sum of columns,
    1,3,5,7,... and column 26 the sum of columns 2,4,6,8,....

    I have manually entered the formula =sum(a1+c1+e1+.....x1). Is there an
    easier way?

    Thanks in advance

  2. #2
    JulieD
    Guest

    Re: How can I add non-adjacent cells with a formula

    Hi

    to sum the EVEN columns
    =SUM(IF(MOD(COLUMN(A1:X1),2)=0,A1:X1,0))

    to sum the ODD columns
    =SUM(IF(MOD(COLUMN(A1:X1),2)=1,A1:X1,0))

    NOTE: these are array formulas so they need to be entered with control &
    shift & enter, not just enter.

    Cheers
    JulieD

    "dhodges00" <[email protected]> wrote in message
    news:[email protected]...
    >I have 24 columns. In columns 25 and 26, I want the sum totals of every
    >other
    > column to its left. In other words, column 25 would show the sum of
    > columns,
    > 1,3,5,7,... and column 26 the sum of columns 2,4,6,8,....
    >
    > I have manually entered the formula =sum(a1+c1+e1+.....x1). Is there an
    > easier way?
    >
    > Thanks in advance




  3. #3
    Aladin Akyurek
    Guest

    Re: How can I add non-adjacent cells with a formula

    1]

    =SUMPRODUCT(--(MOD(COLUMN($A$1:$X$1)-CELL("Col",$A$1)+0,2)=0),$A$1:$X$1)

    2]

    =SUMPRODUCT(--(MOD(COLUMN($A$1:$X$1)-CELL("Col",$A$1)+1,2)=0),$A$1:$X$1)

    dhodges00 wrote:
    > I have 24 columns. In columns 25 and 26, I want the sum totals of every other
    > column to its left. In other words, column 25 would show the sum of columns,
    > 1,3,5,7,... and column 26 the sum of columns 2,4,6,8,....
    >
    > I have manually entered the formula =sum(a1+c1+e1+.....x1). Is there an
    > easier way?
    >
    > Thanks in advance


  4. #4
    RagDyeR
    Guest

    Re: How can I add non-adjacent cells with a formula

    For a non-array option, you could try:

    Odd columns:
    =SUMPRODUCT((MOD(COLUMN(A1:X1)+1,2)=0)*(A1:X1))

    Even columns:
    =SUMPRODUCT((MOD(COLUMN(A1:X1),2)=0)*(A1:X1))
    --

    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================


    "JulieD" <[email protected]> wrote in message
    news:usNwHMM%[email protected]...
    Hi

    to sum the EVEN columns
    =SUM(IF(MOD(COLUMN(A1:X1),2)=0,A1:X1,0))

    to sum the ODD columns
    =SUM(IF(MOD(COLUMN(A1:X1),2)=1,A1:X1,0))

    NOTE: these are array formulas so they need to be entered with control &
    shift & enter, not just enter.

    Cheers
    JulieD

    "dhodges00" <[email protected]> wrote in message
    news:[email protected]...
    >I have 24 columns. In columns 25 and 26, I want the sum totals of every
    >other
    > column to its left. In other words, column 25 would show the sum of
    > columns,
    > 1,3,5,7,... and column 26 the sum of columns 2,4,6,8,....
    >
    > I have manually entered the formula =sum(a1+c1+e1+.....x1). Is there an
    > easier way?
    >
    > Thanks in advance





  5. #5
    Registered User
    Join Date
    05-03-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: How can I add non-adjacent cells with a formula

    How do I add non-adjacent cells; example all in Column C Row 7+11+15+19. 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