+ Reply to Thread
Results 1 to 12 of 12

Sum every nth Column . Help needed

  1. #1
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Sum every nth Column . Help needed

    Greetings everyone and thank you in advance :-)

    I need a formula .
    Range D10 to XC10

    In XD10 I need a formula to sum values every 6 columns
    ( D10+J10+P10 and so on)

    I tried "=SUM(IF(MOD(COLUMN(D$10:XC$10),6 = 1,D10:XC10,0)))" (CTRL_SHIFT_ENTER)

    Excel gives me error and the error highlited is ",6"

    In XE10 I will need the same but starting from E10
    Last edited by AliGW; 01-15-2019 at 05:53 PM. Reason: [SOLVED]

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sum every nth Column . Help needed

    Hello and welcome to the forum.

    Try this:

    =SUMPRODUCT(--(MOD(COLUMN(D10:XC10)-COLUMN(D10),6)=0),D10:XC10)

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: Sum every nth Column . Help needed

    =sumproduct((d10:xc10)*(mod(column(d10:xc10)-4,6)=0))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Re: Sum every nth Column . Help needed

    Thank you both. In both formula I get the same error of my formula.

    I would attach the file here but I am not allowed and I am not allowed to post links:-(

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,266

    Re: Sum every nth Column . Help needed

    Yes, you are allowed to post a workbook, but not links.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Re: Sum every nth Column . Help needed

    Thank you !

    Here attached my file. (Sorry I feel a little dumb today)
    Attached Files Attached Files

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sum every nth Column . Help needed

    Perhaps your error is coming from a translation issue. It works fine on my end.

    I have applied the formula from post #2 in cell A2 and reattached your workbook.

    The formula should automatically convert to comply with your regional settings.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Re: Sum every nth Column . Help needed

    Thank you ! Problem solved .
    Now I need to locate the cause because I am using the English interface ...

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: [SOLVED] Sum every nth Column . Help needed

    You're welcome. Happy to help.

    Thanks for the rep!

    Do your formulas use semicolons ";" instead of commas "," ?

  10. #10
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Re: [SOLVED] Sum every nth Column . Help needed

    At this point I am really confused because I browsed Internet tutorials for 6 hours ...so I definitely love you ! ;-)
    After your first reply I copied and pasted the formula you wrote and it did not work.

    I come from Openoffice ..I had the same sheet and a formula that worked in Openoffice (not the one I pasted at the beginning of the post). I do know that Excel will make my job easier but for now I am totally stuck.
    The next step is that I have to adapt a OO Macro to Excel and I am really considering to reach the "commercial services" because I do not want to abuse of other people time and Job ;-)
    Once again a HUGE Thank you !

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,266

    Re: Sum every nth Column . Help needed

    The correct way to mark a thread as solved is to select Thread Tools from the menu link above and mark this thread as SOLVED. I have done it for you this time.

  12. #12
    Registered User
    Join Date
    01-15-2019
    Location
    Italy
    MS-Off Ver
    2017
    Posts
    6

    Re: Sum every nth Column . Help needed

    Got it .
    Thank you AliGW :-)

+ 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] Formula needed that 1st column only show number not in 2nd column.
    By jp16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-18-2018, 01:55 AM
  2. Macro Needed for contains word in column a insert mark in column b
    By melisaball in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-09-2015, 10:45 AM
  3. Replies: 4
    Last Post: 05-03-2014, 07:09 AM
  4. Replies: 4
    Last Post: 08-01-2012, 08:55 AM
  5. Help needed on Column & Row Headings
    By mkf in forum Excel General
    Replies: 0
    Last Post: 05-09-2006, 06:12 AM
  6. Compare one Column to a Second Column Formula Help Needed
    By jeffc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2006, 10:30 AM
  7. help needed with text to column
    By Lisap in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-01-2005, 01:05 PM

Tags for this Thread

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