+ Reply to Thread
Results 1 to 7 of 7

Adding every 3rd cell in a column WITH TEXT

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Rockville, Maryland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Adding every 3rd cell in a column WITH TEXT

    I'm trying to add every third cell in a column, but every second cell contains text. So the column order is as such: #1, #2, TEXT, #1, #2, TEXT, #1, #2, TEXT, etc.
    So I want to add all the #1s in one cell, and then all the #2s in another. The only way I know how to add cells like this is by using:

    =SUMPRODUCT((O25:O105)*(MOD(ROW(O25:O105)-ROW(O25),3)=0))

    But this doesn't work if there's text in the column.

    Does anyone know how to get around this? Could you give me a function that would work?

    Thanks!

  2. #2
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Adding every 3rd cell in a column WITH TEXT

    =IF(MOD(ROW(OFFSET(A1,2,0)),3)=0,"#1",IF(MOD(ROW(OFFSET(A1,1,0)),3)=0,"#2","Text"))

    copy down
    Ted
    "Live Long and Prosper"

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Adding every 3rd cell in a column WITH TEXT

    Try this:

    =SUMPRODUCT((ISNUMBER(O25:O105))*(MOD(ROW(O25:O105)-ROW(O25),3)=0),O25:O105)

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-27-2012
    Location
    Rockville, Maryland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Adding every 3rd cell in a column WITH TEXT

    I'm sorry, I should have clarified that the cells aren't actually filled with "#1" "#2" & "text"...they're filled with various different numbers & actual random text. So I can't specifically write a string of what's in each box. Thanks though.

  5. #5
    Registered User
    Join Date
    06-27-2012
    Location
    Rockville, Maryland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Adding every 3rd cell in a column WITH TEXT

    Pete, that didn't work for me...but I just tried it a second ago..seeing if I can spot some immediate error quickly..

  6. #6
    Registered User
    Join Date
    06-27-2012
    Location
    Rockville, Maryland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Adding every 3rd cell in a column WITH TEXT

    Wait, that did work! Thanks so much Pete!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Adding every 3rd cell in a column WITH TEXT

    You're welcome. You need to be careful with all the brackets.

    Pete

+ 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