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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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