Formula needed

Overtor105

New Member
Joined
Jul 23, 2024
Messages
2
Office Version
  1. Prefer Not To Say
I need a formula to sum total cells after the last "0" entered within a row. In the attached example, the "?" should read "4".

Thank you in advance!
 

Attachments

  • Screenshot_20240722-235319_Excel.jpg
    Screenshot_20240722-235319_Excel.jpg
    11.6 KB · Views: 15

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I'm assuming you have XMATCH.
Book1
BCDEFGHIJK
11011011114
Sheet1
Cell Formulas
RangeFormula
K1K1=COUNTA(B1:J1)-XMATCH(0,B1:J1,,-1)
 
Upvote 0
The COUNT is ok if the numbers are 1s.
I believe that since the question was about SUM this will be a more correct approach:
Excel Formula:
=SUM(TAKE(B1:K1,1,-(COLUMNS(B1:K1)-XMATCH(0,B1:K1,,-1))))
 
Upvote 0
Another option is you can numbers other than 0 and 1
Fluff.xlsm
ABCDEFGHIJK
1
21111101214
Data
Cell Formulas
RangeFormula
K2K2=SUM(XLOOKUP(0,B2:J2,B2:J2,B2,,-1):J2)
 
Upvote 0

Forum statistics

Threads
1,221,547
Messages
6,160,453
Members
451,647
Latest member
Tdeulkar

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