Formula to sum values in cells in the same row following and excluding the first cell containing a value >0

dyanna

New Member
Joined
Jan 4, 2018
Messages
14
The project that I am working on requires that we identify the number of events that occur following the first month in which one or more events occur. We need to return the sum of the cells in one row following and excluding the first cell in that row with a value greater than 0. There will always be 12 cells in each row.

Example: Row 1 - A1 - L1 and Row 2 - A2 L2

A
B
C
D
E
F
G
A
B
C
D
E
1
0
0
1
2
1
0
1
1
2
0
0
1
2
1
0
0
1
2
3
1
0
0
4
0
5

<tbody>
</tbody>

For row 1, exclude cell C1 and sum cells D1 - L1 = 8
For row 2, exclude cell A2 and sum cells B2 - L2 = 16

I have tried numerous searches to try to locate a solution per the instructions on the Board guidelines to avoid creating a new thread but have been unable to find a solution to match my need. I appreciate any advice that you can provide. Thank you!!!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Perhaps try =SUM(INDEX($A1:$L1,1+MATCH(TRUE,INDEX(A1:L1>0,),0)):L1) and pull down
 
Upvote 0
If the number of events are always single digits like your samples, and you have the CONCAT function in your Excel version, then you could also use this.


Book1
ABCDEFGHIJKLMN
10012101120018
210012310040516
Sum
Cell Formulas
RangeFormula
N1=SUM(A1:L1)-LEFT(CONCAT(A1:L1)+0,1)
 
Upvote 0
Thank you so much for your response Peter. The numbers could potentially exceed two digits but I will definitely save this formula for future use. I appreciate your assistance.
 
Upvote 0
Thank you so much for your response Peter. The numbers could potentially exceed two digits but I will definitely save this formula for future use. I appreciate your assistance.
You're welcome. (It was a bit of a long-shot. :))
 
Upvote 0

Forum statistics

Threads
1,215,092
Messages
6,123,064
Members
449,090
Latest member
fragment

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top