Hi, everyone. So, I am working on multiple columns of data that needs to be a part of a formula. Let's say I have columns A to E - each of the columns correspond to a certain type of data. Now, we have column F where we need the formula to be added so that each cell for each row shows the value "1" counting each time a unique set of values appear for columns A to E. Here's how I want it to look like:
So, basically, I want the value "1" to appear in column F (Count of Unique Values) whenever status is "Active". I need the formula to disregard counting the values in different rows as a unique set of values if the status is "Closed". Cell value should be blank if status is closed.
I tried the formula below but it still counts the sets of values in a row even if the Status is "Closed":
Thanks!
Code:
[TABLE="width: 471"]
<tbody>[TR]
[TD]Building Name[/TD]
[TD]Address[/TD]
[TD]State[/TD]
[TD]Status[/TD]
[TD]Property Code[/TD]
[TD]Count of Unique Values[/TD]
[/TR]
[TR]
[TD]Ashford[/TD]
[TD]Address 1[/TD]
[TD]QLD[/TD]
[TD]Active[/TD]
[TD]AS345[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Alpine[/TD]
[TD]Address 2[/TD]
[TD]VIC[/TD]
[TD]Closed[/TD]
[TD]AL879[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Hampshire[/TD]
[TD]Address 3[/TD]
[TD]NSW[/TD]
[TD]Active[/TD]
[TD]AB123[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Blackwood[/TD]
[TD]Address 4[/TD]
[TD]QLD[/TD]
[TD]Active[/TD]
[TD]BL654[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Lytton[/TD]
[TD]Address 5[/TD]
[TD]VIC[/TD]
[TD]Active[/TD]
[TD]LY430[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Perth[/TD]
[TD]Address 6[/TD]
[TD]NSW[/TD]
[TD]Active[/TD]
[TD]PE100[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Brisbane[/TD]
[TD]Address 7[/TD]
[TD]QLD[/TD]
[TD]Active[/TD]
[TD]BR879[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Redbank[/TD]
[TD]Address 8[/TD]
[TD]VIC[/TD]
[TD]Closed[/TD]
[TD]RE879[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Arcadia[/TD]
[TD]Address 9[/TD]
[TD]NSW[/TD]
[TD]Active[/TD]
[TD]AR530[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Perth[/TD]
[TD]Address 6[/TD]
[TD]QLD[/TD]
[TD]Active[/TD]
[TD]PE879[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Ashford[/TD]
[TD]Address 1[/TD]
[TD]NSW[/TD]
[TD]Active[/TD]
[TD]AS301[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Alpine[/TD]
[TD]Address 2[/TD]
[TD]VIC[/TD]
[TD]Active[/TD]
[TD]AL879[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Hampshire[/TD]
[TD]Address 3[/TD]
[TD]NSW[/TD]
[TD]Active[/TD]
[TD]AB123[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Blackwood[/TD]
[TD]Address 4[/TD]
[TD]NSW[/TD]
[TD]Closed[/TD]
[TD]BL564[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lytton[/TD]
[TD]Address 5[/TD]
[TD]QLD[/TD]
[TD]Closed[/TD]
[TD]LY430[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Perth[/TD]
[TD]Address 6[/TD]
[TD]NSW[/TD]
[TD]Closed[/TD]
[TD]PE100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Brisbane[/TD]
[TD]Address 7[/TD]
[TD]QLD[/TD]
[TD]Active[/TD]
[TD]BR879[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So, basically, I want the value "1" to appear in column F (Count of Unique Values) whenever status is "Active". I need the formula to disregard counting the values in different rows as a unique set of values if the status is "Closed". Cell value should be blank if status is closed.
I tried the formula below but it still counts the sets of values in a row even if the Status is "Closed":
Code:
=IF(SUMPRODUCT(($D$2:$D2="Active")*($C$2:$C2=C2)*($A$2:$A2=A2)*($B$2:$B2=B2))>1,"",1)
Thanks!
Last edited: