Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zipcodes to counties 1

Status
Not open for further replies.

dday01

Technical User
Feb 1, 2002
138
US
Hi all,

I am looking for the best way to create a formula to roll up a zipcode field into counties. I will then create a report grouped by this field. Any help would be greatly appreciated.

Thanks,

D
 
I have done something similar but did not do it in Crystal. What I did was create a look up table that would match my counties by zip code. I then based my report off of that information. I would think it could get cumbersome in Crystal. What happens where there are more zip codes added in the data. I would think you would have to add those zip codes into the formula.

You may want to choose to do it in a query instead.

Best Regards

 
The records that I have that contain the zipcode field all belong to specific counties, there are not any instances where they cross over.

Thanks again

D
 
If you don't currently have the Counties that the zips are in, it's more complicated.

If your records contain the County, you can just group by County.

If not, as Kallen suggested, you can create a table which contains the zips and counties (there are probably free tables on the web somewhere...) and join to it, then group by County.

The alternative would be to create an ugly formula which has something like:

If (table.zip} in ["12345","12346","12347","12348"]
Then
"Somecounty"
else
if (table.zip} in ["12349","12350","12351","12352"]
Then
"Anothercounty"

and group on this formula.

-k kai@informeddatadecisions.com
 
K,
Thanks alot, that formula is the one I was looking for. Unfortunately there is not a county field in the table (I don't get to design the tables, just write reports!:)

Thanks again,

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top