SOLVED

Excel

Copper Contributor

Hello,  I have a 42 mailing lists that each contain 400 addresses and several zip codes.  I need to know how many records are in each zip.  Is there a formula I can plug in to get this number.  Now I am sorting the zip code column and scrolling through each zip and getting the count that way.  I am so hoping there is a quicker way.  Thank you for all your help

7 Replies

@carolyncarolynrodgers 

 

Yes there is a method.

 

I'll let you know the formula. In the meantime, I've notified the moderator of these boards to remove the file you linked to your original posting. You should not post files that contain personal address (or other kinds of) private information.

 

Whenever you post files here, they're basically accessible to the world; I'm sure you would not want your own contact info broadcast widely. Post a sample without any real people's names or addresses.

best response confirmed by carolyncarolynrodgers (Copper Contributor)
Solution

@carolyncarolynrodgers 

 

By far the easiest method does depend on your having the most recent version of Excel. These newest versions support a function called UNIQUE. You can use that to write a formula along these lines:

=UNIQUE(M2:M401)

in which M2:M401 refers to the entire column under the heading of Zip Code

then in the cell next to the resulting list you enter the formula

=COUNTIF($M$2:$M$401,P2)

in which the results of the UNIQUE formula, which begins in cell P2, are compared with the values in that original column of all the zip codes.

 

Since I'd already looked at your file, I used those formulas to get the following results:

mathetes_0-1592344756897.png

I then destroyed my copy of your file.

Thank you so much for your help.

@mathetes 

this was working beautifully.  I dowloaded a google sheet to excel and now this does not work. HELP

 

 

@carolyncarolynrodgers 

 

Without posting private information this time, can you post a copy of the spreadsheet with a few dummy names. Without that, there's no way I or any else can tell you what's gone wrong.

IF HK'S ZIP IS "852" AND column T IS ZIP DATA, THEN [=SUMPRODUCT((T:T="852")*1)] CAN FIND OUT HOW MANY "852" IN column T
I figured out what I was doing wrong. I was not putting in the correct column letter.
1 best response

Accepted Solutions
best response confirmed by carolyncarolynrodgers (Copper Contributor)
Solution

@carolyncarolynrodgers 

 

By far the easiest method does depend on your having the most recent version of Excel. These newest versions support a function called UNIQUE. You can use that to write a formula along these lines:

=UNIQUE(M2:M401)

in which M2:M401 refers to the entire column under the heading of Zip Code

then in the cell next to the resulting list you enter the formula

=COUNTIF($M$2:$M$401,P2)

in which the results of the UNIQUE formula, which begins in cell P2, are compared with the values in that original column of all the zip codes.

 

Since I'd already looked at your file, I used those formulas to get the following results:

mathetes_0-1592344756897.png

I then destroyed my copy of your file.

View solution in original post