Hello,
I did a search and while I found a thread about running a count of an occurrence it didn't exactly match what I am trying to do.
I am trying to set up a formula to perform a running count of an occurrence of a value in a list using more than one condition.
I have been trying to modify the following formula by adding an "AND"
Single condition: IF(a5="John",COUNTIF($a$5:a5,"John"),"")
My data is as follows:
Column A Column B Column C Column D
1 Seller Product Date
2 John Apple
3 Mary Orange
4 Tim Orange
5 John Apple 1/1/20
6 Bob Apple 1/1/20
7 Pete Orange 1/2/20
8 Mary Apple 1/3/20
9 John Apple 1/4/20
I would like Column D to return which occurrence of the seller's name we are seeing if the product = apple and there is a date in Column C
The formula I am using is: =IF(AND(A2=A2,C2<>"",B2="apple"),COUNTIF($A$2:A2,A2),"")
So, for seller John:
- in row 5, it returns a 2 but I would like it to return a 1
- in row 9, it returns a 3, but I would like it to return a 2
It seems to be counting row #2 for John even though the date column is blank
Any assistance you can provide is greatly appreciated.
Thank you
I did a search and while I found a thread about running a count of an occurrence it didn't exactly match what I am trying to do.
I am trying to set up a formula to perform a running count of an occurrence of a value in a list using more than one condition.
I have been trying to modify the following formula by adding an "AND"
Single condition: IF(a5="John",COUNTIF($a$5:a5,"John"),"")
My data is as follows:
Column A Column B Column C Column D
1 Seller Product Date
2 John Apple
3 Mary Orange
4 Tim Orange
5 John Apple 1/1/20
6 Bob Apple 1/1/20
7 Pete Orange 1/2/20
8 Mary Apple 1/3/20
9 John Apple 1/4/20
I would like Column D to return which occurrence of the seller's name we are seeing if the product = apple and there is a date in Column C
The formula I am using is: =IF(AND(A2=A2,C2<>"",B2="apple"),COUNTIF($A$2:A2,A2),"")
So, for seller John:
- in row 5, it returns a 2 but I would like it to return a 1
- in row 9, it returns a 3, but I would like it to return a 2
It seems to be counting row #2 for John even though the date column is blank
Any assistance you can provide is greatly appreciated.
Thank you