Formula to negative increment value based on COUNTIF.

jmpatrick

Active Member
Joined
Aug 17, 2016
Messages
477
Office Version
  1. 365
Platform
  1. Windows
Good morning. Here's my sheet:

indy.png


Here's the formula I wrote in Column B:

Excel Formula:
=IF(COUNTIF($E142,"Yes"),$B143 - 1,$B143)

I can't figure out how to ignore a No value in Column E so that only rows with a Yes value increment backwards. I entered the -3 to show what I'm looking to do with the formula.

Am I close?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Why are you looking at E142 but then subtracting 1 from the row below?
 
Upvote 0
Try putting this formula in cell B138 and copying down:
Excel Formula:
=IF(E138="Yes",0-COUNTIF(E138:E$145,"Yes"),"")
 
Upvote 0
Solution
You are welcome.
Glad we could help.
 
Upvote 0

Forum statistics

Threads
1,215,412
Messages
6,124,761
Members
449,187
Latest member
hermansoa

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