reset count value if certain value found within range cell

hsolanki

Board Regular
Joined
Jan 16, 2020
Messages
204
Office Version
  1. 2010
Platform
  1. Windows
Hi Experts

i was wondering if there any way to reset the value back to Zero if certian value found for example

i have got an formula on excel whereby it calculate and add all the "S" from a range "B11:AF33" however is there anyway also back to 0 value if "ar" found within the same range "B11:AF33"

below it is the formula that counts all the "S" and add the result in to cell number "B6"

=SUMPRODUCT(LEN(B11:AF33)-LEN(SUBSTITUTE(B11:AF33,"s","")))
 
Is this what you are trying?

Cell B9

Excel Formula:
=SUMPRODUCT(--(EXACT(B11:AF33,"S")))

Cell C9

Excel Formula:
=SUMPRODUCT(--(EXACT(B11:AF33,"s")))

Cell D9

Excel Formula:
=IF(COUNTIF(B11:AF33,"AR")<>0,0,B9+C9)
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi Siddharth i have tried your suggestion however it doesn't reset the number back to zero once "ar" is found and it does not start re-calculating all the "S" again
 
Upvote 0
The moment you type "ar", the count does go to 0. I think I am not able to understand your requirement. See my very first post. See how I created screenshot showing S and AR and showed you the counts? Can you create couple of similar scenarios and post them as screenshots?

For example, see these 3 scenarios. What should be the values that you are expecting to see in "???"

1642456960088.png
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,642
Members
452,663
Latest member
MEMEH

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