Array or Spreadsheet for ZIP Codes in Qualtrics | XM Community
Skip to main content
In one of our surveys, we're asking for respondents' ZIP codes.



We'd then like to ask them a question about how they would allocate money between the national government and the state government, and then between the state government and the city government. The first question's simple since we're only surveying respondents in the United States and ask them explicitly for the state they live in earlier in the survey. But for the second question (something like "how would you split $X between the government of Alaska, and the government of Juneau", for example), we don't necessarily want to explicitly ask people for the city they live in as well (it's a last-resort option).



So given that, I've been able to find some spreadsheets that map ZIP codes into the corresponding "town" or "city", but of course there's 40,000 + ZIP codes, easily hundreds if not thousands of which may come up in our survey. So is there some method by which I can take the user's input (their ZIP code), and find that in an array somewhere in Qualtrics that contains the ZIP code and the corresponding town/city?



I know that Authenticators basically just check some list/ spreadsheet for an email, for example, so is there a way to do this same thing but for ZIP codes and a corresponding "ZIP Code list" (as opposed to a contact list), that I could use to pull out the name of the respondent's town or city? I know also validation for text entry can check that a user's input is actually a valid US postal code, so presumably Qualtrics already has some sort of list in the background checking that the user's input matches one of the ZIP codes there?
Hello @DRRTGCC ,



Here is the attachment of the US zip code and city place name.

Just import it in your contact list. The given contact list has zip code as external data reference, so just use authenticator element in survey flow. And follow this page for implementation.
Thank you so much @Shashi! This is perfect.

DRRTGCC - hi! I tried to use this approach with an updated version of the Excel, but my contact list upload (file attached for reference) failed. Any pointers?
ZIP_Lookup Table - Qualtrics v01.csv


I know this is not the question being asked, but just a side note to be careful with use cases on Zip Codes, especially where planning to DISPLAY the lookup as part of the question. For a lookup at the back end of the data, this will be so helpful, but for embedding in a question, variations in how postal offices are distributed can cause... unexpected results in your responses.
Some places have regional zip codes. Some locations share post offices.
In the original example on this post, if someone had asked the question of my folks (regional post office, far from their actual local government) they might have very different answers on that basis. My post office is listed as Baltimore. I do not live in the city of Baltimore. I don't even live in the same county (because Baltimore City is its own county, separate from Baltimore County). In fact my post office has 2 names, and neither one is actually "where I live" but the latest posted file shows it as Baltimore so just to point out... if someone asked me how I would split $ between my state and [a city & county I do not in fact live in], I would not be answering the way intended, because I would not be being asked about my actual LOCAL government.


Leave a Reply