youreskimofriend
New Member
- Joined
- Aug 20, 2013
- Messages
- 3
Hey everybody,
I already managed to almost solve my problem with putting together a rather long formula from existing threads but when it comes to those ranges I give up.
I have a very large data set (30k rows, no blanks) and I am trying to count distinct account numbers based on two criteria but one should capture a range.
This is a simplified version:
<tbody>
</tbody>
The question I am trying to answer is: How many clients from the USA have purchased something 1-3 years or 3-5 years ago. How many clients from Germany, etc.
I was able to figure out the formula for each individual year, but not the ranges. E.g. for year 2 I can get the distinct US clients like this:
=SUM((IF((C2:C6=2)*(B2:B6="USA")*(A2:A6<>"");1/COUNTIFS(A2:A6;A2:A6;C2:C6;2;B2:B6;"USA";A2:A6;"<>"))))
Any help is greatly appreciated!
Andi
I already managed to almost solve my problem with putting together a rather long formula from existing threads but when it comes to those ranges I give up.
I have a very large data set (30k rows, no blanks) and I am trying to count distinct account numbers based on two criteria but one should capture a range.
This is a simplified version:
Account Nr. | Country | Age of purchase (years) |
123 | USA | 1 |
123 | USA | 2 |
234 | USA | 2 |
234 | USA | 3 |
345 | Germany | 1 |
<tbody>
</tbody>
The question I am trying to answer is: How many clients from the USA have purchased something 1-3 years or 3-5 years ago. How many clients from Germany, etc.
I was able to figure out the formula for each individual year, but not the ranges. E.g. for year 2 I can get the distinct US clients like this:
=SUM((IF((C2:C6=2)*(B2:B6="USA")*(A2:A6<>"");1/COUNTIFS(A2:A6;A2:A6;C2:C6;2;B2:B6;"USA";A2:A6;"<>"))))
Any help is greatly appreciated!
Andi