In previous attempts I seem to have had difficulty interpreting the mission.
With that much data would you be willing to reconsider helper columns to lighten the load?
In the attached column C returns postal codes where the pairings are unique. The formula is
Formula:
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,B2,"")
In helper column D my previous formula that returns row numbers for first occurrences of postal codes is
Formula:
=IF(COUNTIF($B$2:B2,B2)=1,ROWS($2:2),"")
Then final output of unique postal codes in column E would be
Formula:
=IFERROR(INDEX($B$2:$B$35000,SMALL($D$2:$D$35000,ROWS($2:2))),"")
and the counts in column F
Formula:
=IF(E2="","",COUNTIF($C$2:$C$35000,E2))
|
A |
B |
C |
D |
E |
F |
1 |
account number |
postal code |
helper 1 |
helper 2 |
|
|
2 |
12345 |
E2J 4G3 |
E2J 4G3 |
1 |
E2J 4G3 |
2 |
3 |
12345 |
E2J 4G3 |
|
|
S2F 5T5 |
1 |
4 |
12345 |
E2J 4G3 |
|
|
|
|
5 |
98756 |
S2F 5T5 |
S2F 5T5 |
4 |
|
|
6 |
98756 |
S2F 5T5 |
|
|
|
|
7 |
65467 |
E2J 4G3 |
E2J 4G3 |
|
|
|
Bookmarks