+ Reply to Thread
Results 1 to 9 of 9

Sum range of cells depending the value of another cel

  1. #1
    Registered User
    Join Date
    05-07-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    5

    Sum range of cells depending the value of another cel

    Hi,

    I'm trying to automate an excel file.

    I have a range of 53 columns where i want to count the range of A1+B1 iff the value is 2, and so it has to continue to the right B1+C1

    If the value is 10 the sum has to be A1:J1 and for the next cell in the row B1:K1

    Does anyone have a formula for that?

    Thanks in advance.

    Jens

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Sum range of cells depending the value of another cel

    Next Cell Means it moves towards down or towards right
    please attach sample file with desired result if possible
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    05-07-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Sum range of cells depending the value of another cel

    Hi Siva,

    Thanks for your answer, i attached an example to this post.

    Hope you can come up with something?

    Thanks

    excel.xlsx

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Sum range of cells depending the value of another cel

    N2=IFERROR(SUM(A2:INDEX(A2:$J2,ROWS(N$2:N2)*2)),"")
    Try this and copy across

  5. #5
    Registered User
    Join Date
    05-07-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Sum range of cells depending the value of another cel

    Hi Siva,

    I tried it on both English and Dutch excel versions but keep getting this error?

    error excel1.jpg
    error excel2.jpg

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,320

    Re: Sum range of cells depending the value of another cel

    =IFERROR(SUM(A2:INDEX(A2:$J2;ROWS(N$2:N2)*2));"")
    Try it this way
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  7. #7
    Registered User
    Join Date
    05-07-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Sum range of cells depending the value of another cel

    Thanks for the help but now it gives me the following error (in dutch)

    #NAAM?

  8. #8
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,320

    Re: Sum range of cells depending the value of another cel

    Formule even vertalen (translate it)

    http://dolf.trieschnigg.nl/excel/index.php

  9. #9
    Registered User
    Join Date
    05-07-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Sum range of cells depending the value of another cel

    Thanks, translation helped and i adjusted the formula a little bit and now it works

    =IFERROR(SUM(A2:INDEX(A2:$J2;$L2));"")

+ 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. How to distribute on amount in to different cells depending on the dale range
    By saidmalikov in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2014, 11:51 AM
  2. [SOLVED] Lock specific range of cells depending on cell value
    By yoda66 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-27-2013, 11:30 AM
  3. [SOLVED] Sum formula with Range depending on value of other cells
    By Tejas.T in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-29-2012, 02:56 PM
  4. Sending mail depending upon the range of cells
    By manusharma11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2012, 05:24 PM
  5. Replies: 2
    Last Post: 04-05-2012, 08:22 AM

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