Posted 09-07-2017 21:20

Well I wrote a quick script using the algorithm I outlined above and spit out a formula.

I think the general idea is true that zip codes for a county are within certain upper and lower bounds but there appear to be exceptions you would have to hunt down.

Oddly the first test in the formula for zip code 00501 is an IRS Service Center out of sequence from the other zip codes for Suffolk County:

https://www.unitedstateszipcodes.org/00501/

I know there are so called "stealth" zip codes for US Marshal Servcies, Military Installations, Area 51 and apparently the IRS. I will contact Mulder & Scully and see if they have any insight.

var Number z = ToNumber([ZipCode]);

If(

501 <= $z and $z <= 11980, "Suffolk, NY",

601 <= $z and $z <= 601, "Adjuntas, PR",

602 <= $z and $z <= 602, "Aguada, PR",

603 <= $z and $z <= 690, "Aguadilla, PR",

606 <= $z and $z <= 606, "Maricao, PR",

610 <= $z and $z <= 610, "Anasco, PR",

611 <= $z and $z <= 641, "Utuado, PR",

612 <= $z and $z <= 688, "Arecibo, PR",

617 <= $z and $z <= 617, "Barceloneta, PR",

622 <= $z and $z <= 623, "Cabo Rojo, PR",

624 <= $z and $z <= 624, "Penuelas, PR",

627 <= $z and $z <= 627, "Camuy, PR",

631 <= $z and $z <= 669, "Lares, PR",

636 <= $z and $z <= 683, "San German, PR",

637 <= $z and $z <= 637, "Sabana Grande, PR",

638 <= $z and $z <= 638, "Ciales, PR",

646 <= $z and $z <= 646, "Dorado, PR",

647 <= $z and $z <= 653, "Guanica, PR",

650 <= $z and $z <= 650, "Florida, PR",

656 <= $z and $z <= 785, "Guayanilla, PR",

659 <= $z and $z <= 659, "Hatillo, PR",

660 <= $z and $z <= 660, "Hormigueros, PR",

662 <= $z and $z <= 662, "Isabela, PR",

664 <= $z and $z <= 664, "Jayuya, PR",

667 <= $z and $z <= 667, "Lajas, PR",

670 <= $z and $z <= 670, "Las Marias, PR",

674 <= $z and $z <= 674, "Manati, PR",

676 <= $z and $z <= 676, "Moca, PR",

677 <= $z and $z <= 677, "Rincon, PR",

678 <= $z and $z <= 678, "Quebradillas, PR",

680 <= $z and $z <= 682, "Mayaguez, PR",

685 <= $z and $z <= 685, "San Sebastian, PR",

687 <= $z and $z <= 687, "Morovis, PR",

692 <= $z and $z <= 692, "Vega Alta, PR",

693 <= $z and $z <= 694, "Vega Baja, PR",

698 <= $z and $z <= 698, "Yauco, PR",

703 <= $z and $z <= 703, "Aguas Buenas, PR",

704 <= $z and $z <= 784, "Guayama, PR",

705 <= $z and $z <= 786, "Aibonito, PR",

707 <= $z and $z <= 707, "Maunabo, PR",

714 <= $z and $z <= 714, "Arroyo, PR",

715 <= $z and $z <= 780, "Ponce, PR",

718 <= $z and $z <= 744, "Naguabo, PR",

719 <= $z and $z <= 719, "Naranjito, PR",

720 <= $z and $z <= 720, "Orocovis, PR",

721 <= $z and $z <= 745, "Rio Grande, PR",

723 <= $z and $z <= 723, "Patillas, PR",

725 <= $z and $z <= 727, "Caguas, PR",

729 <= $z and $z <= 729, "Canovanas, PR",

735 <= $z and $z <= 742, "Ceiba, PR",

736 <= $z and $z <= 737, "Cayey, PR",

738 <= $z and $z <= 740, "Fajardo, PR",

739 <= $z and $z <= 739, "Cidra, PR",

741 <= $z and $z <= 792, "Humacao, PR",

751 <= $z and $z <= 751, "Salinas, PR",

754 <= $z and $z <= 754, "San Lorenzo, PR",

757 <= $z and $z <= 757, "Santa Isabel, PR",

765 <= $z and $z <= 765, "Vieques, PR",

766 <= $z and $z <= 766, "Villalba, PR",

767 <= $z and $z <= 767, "Yabucoa, PR",

769 <= $z and $z <= 769, "Coamo, PR",

771 <= $z and $z <= 771, "Las Piedras, PR",

772 <= $z and $z <= 772, "Loiza, PR",

773 <= $z and $z <= 773, "Luquillo, PR",

775 <= $z and $z <= 775, "Culebra, PR",

777 <= $z and $z <= 777, "Juncos, PR",

778 <= $z and $z <= 778, "Gurabo, PR",

782 <= $z and $z <= 782, "Comerio, PR",

783 <= $z and $z <= 783, "Corozal, PR",

794 <= $z and $z <= 794, "Barranquitas, PR",

795 <= $z and $z <= 795, "Juana Diaz, PR",

801 <= $z and $z <= 805, "Saint Thomas, VI",

820 <= $z and $z <= 851, "Saint Croix, VI",

830 <= $z and $z <= 831, "Saint John, VI",

901 <= $z and $z <= 982, "San Juan, PR",

934 <= $z and $z <= 961, "Bayamon, PR",

949 <= $z and $z <= 952, "Toa Baja, PR",

953 <= $z and $z <= 954, "Toa Alta, PR",

962 <= $z and $z <= 963, "Catano, PR",

965 <= $z and $z <= 971, "Guaynabo, PR",

976 <= $z and $z <= 978, "Trujillo Alto, PR",

983 <= $z and $z <= 988, "Carolina, PR",

1001 <= $z and $z <= 1521, "Hampden, MA",

1002 <= $z and $z <= 1243, "Hampshire, MA",

1005 <= $z and $z <= 1772, "Worcester, MA",

1029 <= $z and $z <= 1343, "Berkshire, MA",

1054 <= $z and $z <= 1380, "Franklin, MA",

1431 <= $z and $z <= 2495, "Middlesex, MA",

1810 <= $z and $z <= 5544, "Essex, MA",

2018 <= $z and $z <= 2770, "Plymouth, MA",

2019 <= $z and $z <= 2762, "Norfolk, MA",

2031 <= $z and $z <= 2791, "Bristol, MA",

2101 <= $z and $z <= 2297, "Suffolk, MA",

2532 <= $z and $z <= 2675, "Barnstable, MA",

2535 <= $z and $z <= 2713, "Dukes, MA",

2554 <= $z and $z <= 2584, "Nantucket, MA",

2801 <= $z and $z <= 2878, "Newport, RI",

2802 <= $z and $z <= 2940, "Providence, RI",

2804 <= $z and $z <= 2898, "Washington, RI",

2806 <= $z and $z <= 2885, "Bristol, RI",

2816 <= $z and $z <= 2893, "Kent, RI",

3031 <= $z and $z <= 3468, "Hillsborough, NH",

3032 <= $z and $z <= 3885, "Rockingham, NH",

3046 <= $z and $z <= 3307, "Merrimack, NH",

3215 <= $z and $z <= 3785, "Grafton, NH",

3218 <= $z and $z <= 3837, "Belknap, NH",

3227 <= $z and $z <= 3897, "Carroll, NH",

3280 <= $z and $z <= 3782, "Sullivan, NH",

3431 <= $z and $z <= 3609, "Cheshire, NH",

3570 <= $z and $z <= 3598, "Coos, NH",

3805 <= $z and $z <= 3884, "Strafford, NH",

3901 <= $z and $z <= 4095, "York, ME",

4003 <= $z and $z <= 4260, "Cumberland, ME",

4008 <= $z and $z <= 4579, "Sagadahoc, ME",

4010 <= $z and $z <= 4292, "Oxford, ME",

4210 <= $z and $z <= 4291, "Androscoggin, ME",

4225 <= $z and $z <= 4992, "Franklin, ME",

4259 <= $z and $z <= 4989, "Kennebec, ME",

4341 <= $z and $z <= 4852, "Lincoln, ME",

4354 <= $z and $z <= 4988, "Waldo, ME",

4401 <= $z and $z <= 4969, "Penobscot, ME",

4406 <= $z and $z <= 4485, "Piscataquis, ME",

4408 <= $z and $z <= 4693, "Hancock, ME",

4413 <= $z and $z <= 4694, "Washington, ME",

4471 <= $z and $z <= 4788, "Aroostook, ME",

4478 <= $z and $z <= 4985, "Somerset, ME",

4547 <= $z and $z <= 4865, "Knox, ME",

5001 <= $z and $z <= 5772, "Windsor, VT",

5033 <= $z and $z <= 5679, "Orange, VT",

5042 <= $z and $z <= 5873, "Caledonia, VT",

5101 <= $z and $z <= 5363, "Windham, VT",

5152 <= $z and $z <= 5776, "Bennington, VT",

5401 <= $z and $z <= 5495, "Chittenden, VT",

5440 <= $z and $z <= 5486, "Grand Isle, VT",

5441 <= $z and $z <= 5488, "Franklin, VT",

5442 <= $z and $z <= 5680, "Lamoille, VT",

5443 <= $z and $z <= 5778, "Addison, VT",

5601 <= $z and $z <= 5682, "Washington, VT",

5701 <= $z and $z <= 5777, "Rutland, VT",

5820 <= $z and $z <= 5875, "Orleans, VT",

5824 <= $z and $z <= 5907, "Essex, VT",

6001 <= $z and $z <= 6489, "Hartford, CT",

6018 <= $z and $z <= 6798, "Litchfield, CT",

6029 <= $z and $z <= 6279, "Tolland, CT",

6226 <= $z and $z <= 6387, "Windham, CT",

6249 <= $z and $z <= 6474, "New London, CT",

6401 <= $z and $z <= 6770, "New Haven, CT",

6404 <= $z and $z <= 6928, "Fairfield, CT",

6409 <= $z and $z <= 6498, "Middlesex, CT",

7001 <= $z and $z <= 8989, "Middlesex, NJ",

7002 <= $z and $z <= 7399, "Hudson, NJ",

7003 <= $z and $z <= 7199, "Essex, NJ",

7005 <= $z and $z <= 7999, "Morris, NJ",

7010 <= $z and $z <= 7677, "Bergen, NJ",

7011 <= $z and $z <= 7544, "Passaic, NJ",

7016 <= $z and $z <= 7974, "Union, NJ",

7059 <= $z and $z <= 8896, "Somerset, NJ",

7416 <= $z and $z <= 7890, "Sussex, NJ",

7701 <= $z and $z <= 8750, "Monmouth, NJ",

7820 <= $z and $z <= 8886, "Warren, NJ",

7830 <= $z and $z <= 8889, "Hunterdon, NJ",

8001 <= $z and $z <= 8347, "Salem, NJ",

8002 <= $z and $z <= 8110, "Camden, NJ",

8005 <= $z and $z <= 8759, "Ocean, NJ",

8010 <= $z and $z <= 8641, "Burlington, NJ",

8014 <= $z and $z <= 8344, "Gloucester, NJ",

8037 <= $z and $z <= 8406, "Atlantic, NJ",

8202 <= $z and $z <= 8270, "Cape May, NJ",

8302 <= $z and $z <= 8362, "Cumberland, NJ",

8520 <= $z and $z <= 8695, "Mercer, NJ",

9007 <= $z and $z <= 9899, "undefined, AE",

10001 <= $z and $z <= 10292, "New York, NY",

10301 <= $z and $z <= 10314, "Richmond, NY",

10451 <= $z and $z <= 10499, "Bronx, NY",

10501 <= $z and $z <= 10805, "Westchester, NY",

10509 <= $z and $z <= 12563, "Putnam, NY",

10901 <= $z and $z <= 10995, "Rockland, NY",

10910 <= $z and $z <= 12780, "Orange, NY",

11001 <= $z and $z <= 11855, "Nassau, NY",

11004 <= $z and $z <= 11697, "Queens, NY",

11201 <= $z and $z <= 11256, "Kings, NY",

12007 <= $z and $z <= 12469, "Albany, NY",

12008 <= $z and $z <= 12345, "Schenectady, NY",

12010 <= $z and $z <= 13452, "Montgomery, NY",

12015 <= $z and $z <= 12496, "Greene, NY",

12017 <= $z and $z <= 12593, "Columbia, NY",

12018 <= $z and $z <= 12198, "Rensselaer, NY",

12019 <= $z and $z <= 12884, "Saratoga, NY",

12025 <= $z and $z <= 13470, "Fulton, NY",

12031 <= $z and $z <= 13459, "Schoharie, NY",

12057 <= $z and $z <= 12887, "Washington, NY",

12064 <= $z and $z <= 13861, "Otsego, NY",

12108 <= $z and $z <= 13436, "Hamilton, NY",

12167 <= $z and $z <= 13860, "Delaware, NY",

12401 <= $z and $z <= 12782, "Ulster, NY",

12501 <= $z and $z <= 12604, "Dutchess, NY",

12701 <= $z and $z <= 12792, "Sullivan, NY",

12801 <= $z and $z <= 12886, "Warren, NY",

12851 <= $z and $z <= 12998, "Essex, NY",

12901 <= $z and $z <= 12992, "Clinton, NY",

12914 <= $z and $z <= 13655, "Franklin, NY",

12922 <= $z and $z <= 13699, "Saint Lawrence, NY",

13020 <= $z and $z <= 13290, "Onondaga, NY",

13021 <= $z and $z <= 13166, "Cayuga, NY",

13028 <= $z and $z <= 13493, "Oswego, NY",

13032 <= $z and $z <= 13484, "Madison, NY",

13040 <= $z and $z <= 13863, "Cortland, NY",

13053 <= $z and $z <= 14886, "Tompkins, NY",

13054 <= $z and $z <= 13599, "Oneida, NY",

13065 <= $z and $z <= 14860, "Seneca, NY",

13124 <= $z and $z <= 13844, "Chenango, NY",

13143 <= $z and $z <= 14590, "Wayne, NY",

13305 <= $z and $z <= 13648, "Lewis, NY",

13324 <= $z and $z <= 13491, "Herkimer, NY",

13601 <= $z and $z <= 13693, "Jefferson, NY",

13732 <= $z and $z <= 14892, "Tioga, NY",

13737 <= $z and $z <= 13905, "Broome, NY",

14001 <= $z and $z <= 14280, "Erie, NY",

14003 <= $z and $z <= 14557, "Genesee, NY",

14008 <= $z and $z <= 14305, "Niagara, NY",

14009 <= $z and $z <= 14591, "Wyoming, NY",

14029 <= $z and $z <= 14897, "Allegany, NY",

14041 <= $z and $z <= 14788, "Cattaraugus, NY",

14048 <= $z and $z <= 14787, "Chautauqua, NY",

14098 <= $z and $z <= 14571, "Orleans, NY",

14410 <= $z and $z <= 14694, "Monroe, NY",

14414 <= $z and $z <= 14846, "Livingston, NY",

14415 <= $z and $z <= 14878, "Yates, NY",

14424 <= $z and $z <= 14585, "Ontario, NY",

14529 <= $z and $z <= 14898, "Steuben, NY",

14805 <= $z and $z <= 14893, "Schuyler, NY",

14814 <= $z and $z <= 14925, "Chemung, NY",

15001 <= $z and $z <= 16141, "Beaver, PA",

15004 <= $z and $z <= 15483, "Washington, PA",

15006 <= $z and $z <= 15295, "Allegheny, PA",

15012 <= $z and $z <= 15631, "Fayette, PA",

15062 <= $z and $z <= 15954, "Westmoreland, PA",

15310 <= $z and $z <= 15380, "Greene, PA",

15411 <= $z and $z <= 15963, "Somerset, PA",

15521 <= $z and $z <= 17211, "Bedford, PA",

15536 <= $z and $z <= 17267, "Fulton, PA",

15630 <= $z and $z <= 16263, "Armstrong, PA",

15681 <= $z and $z <= 16256, "Indiana, PA",

15711 <= $z and $z <= 15865, "Jefferson, PA",

15714 <= $z and $z <= 16699, "Cambria, PA",

15721 <= $z and $z <= 16881, "Clearfield, PA",

15821 <= $z and $z <= 16734, "Elk, PA",

15828 <= $z and $z <= 16370, "Forest, PA",

15832 <= $z and $z <= 15861, "Cameron, PA",

16001 <= $z and $z <= 16066, "Butler, PA",

16028 <= $z and $z <= 16375, "Clarion, PA",

16101 <= $z and $z <= 16172, "Lawrence, PA",

16110 <= $z and $z <= 16440, "Crawford, PA",

16113 <= $z and $z <= 16311, "Mercer, PA",

16301 <= $z and $z <= 16374, "Venango, PA",

16312 <= $z and $z <= 16436, "Warren, PA",

16333 <= $z and $z <= 16751, "Mckean, PA",

16401 <= $z and $z <= 16565, "Erie, PA",

16601 <= $z and $z <= 16693, "Blair, PA",

16611 <= $z and $z <= 17264, "Huntingdon, PA",

16677 <= $z and $z <= 16882, "Centre, PA",

16720 <= $z and $z <= 17729, "Potter, PA",

16822 <= $z and $z <= 17779, "Clinton, PA",

16901 <= $z and $z <= 17765, "Tioga, PA",

16910 <= $z and $z <= 18854, "Bradford, PA",

17001 <= $z and $z <= 17266, "Cumberland, PA",

17002 <= $z and $z <= 17099, "Mifflin, PA",

17003 <= $z and $z <= 17088, "Lebanon, PA",

17005 <= $z and $z <= 17177, "Dauphin, PA",

17006 <= $z and $z <= 17090, "Perry, PA",

17014 <= $z and $z <= 17094, "Juniata, PA",

17017 <= $z and $z <= 17881, "Northumberland, PA",

17019 <= $z and $z <= 17415, "York, PA",

17022 <= $z and $z <= 19501, "Lancaster, PA",

17201 <= $z and $z <= 17272, "Franklin, PA",

17301 <= $z and $z <= 17375, "Adams, PA",

17701 <= $z and $z <= 17776, "Lycoming, PA",

17731 <= $z and $z <= 18632, "Sullivan, PA",

17810 <= $z and $z <= 17889, "Union, PA",

17812 <= $z and $z <= 17882, "Snyder, PA",

17814 <= $z and $z <= 18631, "Columbia, PA",

17821 <= $z and $z <= 17884, "Montour, PA",

17901 <= $z and $z <= 19549, "Schuylkill, PA",

18001 <= $z and $z <= 18351, "Northampton, PA",

18011 <= $z and $z <= 18195, "Lehigh, PA",

18012 <= $z and $z <= 18624, "Carbon, PA",

18039 <= $z and $z <= 19067, "Bucks, PA",

18041 <= $z and $z <= 19525, "Montgomery, PA",

18056 <= $z and $z <= 19640, "Berks, PA",

18058 <= $z and $z <= 18610, "Monroe, PA",

18201 <= $z and $z <= 18774, "Luzerne, PA",

18324 <= $z and $z <= 18464, "Pike, PA",

18401 <= $z and $z <= 18473, "Wayne, PA",

18403 <= $z and $z <= 18653, "Lackawanna, PA",

18413 <= $z and $z <= 18847, "Susquehanna, PA",

18419 <= $z and $z <= 18657, "Wyoming, PA",

19003 <= $z and $z <= 19373, "Delaware, PA",

19019 <= $z and $z <= 19255, "Philadelphia, PA",

19301 <= $z and $z <= 19520, "Chester, PA",

19415 <= $z and $z <= 19415, "undefined, PA",

19701 <= $z and $z <= 19899, "New Castle, DE",

19901 <= $z and $z <= 19980, "Kent, DE",

19930 <= $z and $z <= 19975, "Sussex, DE",

20001 <= $z and $z <= 20599, "District Of Columbia, DC",

20101 <= $z and $z <= 22093, "Loudoun, VA",

20106 <= $z and $z <= 22749, "Rappahannock, VA",

20108 <= $z and $z <= 20110, "Manassas City, VA",

20111 <= $z and $z <= 20113, "Manassas Park City, VA",

20115 <= $z and $z <= 22742, "Fauquier, VA",

20120 <= $z and $z <= 22321, "Fairfax, VA",

20136 <= $z and $z <= 22195, "Prince William, VA",

20601 <= $z and $z <= 20695, "Charles, MD",

20606 <= $z and $z <= 20692, "Saint Marys, MD",

20607 <= $z and $z <= 20799, "Prince Georges, MD",

20610 <= $z and $z <= 20754, "Calvert, MD",

20701 <= $z and $z <= 21794, "Howard, MD",

20711 <= $z and $z <= 21412, "Anne Arundel, MD",

20812 <= $z and $z <= 20997, "Montgomery, MD",

21001 <= $z and $z <= 21161, "Harford, MD",

21013 <= $z and $z <= 21286, "Baltimore, MD",

21048 <= $z and $z <= 21797, "Carroll, MD",

21201 <= $z and $z <= 21298, "Baltimore City, MD",

21501 <= $z and $z <= 21766, "Allegany, MD",

21520 <= $z and $z <= 21561, "Garrett, MD",

21601 <= $z and $z <= 21679, "Talbot, MD",

21607 <= $z and $z <= 21690, "Queen Annes, MD",

21609 <= $z and $z <= 21688, "Caroline, MD",

21610 <= $z and $z <= 21678, "Kent, MD",

21613 <= $z and $z <= 21869, "Dorchester, MD",

21701 <= $z and $z <= 21798, "Frederick, MD",

21711 <= $z and $z <= 21795, "Washington, MD",

21801 <= $z and $z <= 21875, "Wicomico, MD",

21811 <= $z and $z <= 21872, "Worcester, MD",

21817 <= $z and $z <= 21890, "Somerset, MD",

21901 <= $z and $z <= 21930, "Cecil, MD",

22030 <= $z and $z <= 22038, "Fairfax City, VA",

22040 <= $z and $z <= 22046, "Falls Church City, VA",

22201 <= $z and $z <= 22246, "Arlington, VA",

22301 <= $z and $z <= 22336, "Alexandria City, VA",

22401 <= $z and $z <= 22404, "Fredericksburg City, VA",

22403 <= $z and $z <= 22555, "Stafford, VA",

22407 <= $z and $z <= 22565, "Spotsylvania, VA",

22427 <= $z and $z <= 22580, "Caroline, VA",

22432 <= $z and $z <= 22579, "Northumberland, VA",

22433 <= $z and $z <= 22972, "Orange, VA",

22436 <= $z and $z <= 23115, "Essex, VA",

22442 <= $z and $z <= 22581, "Westmoreland, VA",

22448 <= $z and $z <= 22547, "King George, VA",

22460 <= $z and $z <= 22572, "Richmond, VA",

22480 <= $z and $z <= 22578, "Lancaster, VA",

22601 <= $z and $z <= 22604, "Winchester City, VA",

22602 <= $z and $z <= 22656, "Frederick, VA",

22610 <= $z and $z <= 22649, "Warren, VA",

22611 <= $z and $z <= 22663, "Clarke, VA",

22626 <= $z and $z <= 22847, "Shenandoah, VA",

22650 <= $z and $z <= 22851, "Page, VA",

22701 <= $z and $z <= 22741, "Culpeper, VA",

22709 <= $z and $z <= 22989, "Madison, VA",

22801 <= $z and $z <= 22807, "Harrisonburg City, VA",

22802 <= $z and $z <= 24471, "Rockingham, VA",

22843 <= $z and $z <= 24486, "Augusta, VA",

22901 <= $z and $z <= 24590, "Albemarle, VA",

22902 <= $z and $z <= 22910, "Charlottesville City, VA",

22920 <= $z and $z <= 24599, "Nelson, VA",

22935 <= $z and $z <= 22973, "Greene, VA",

22963 <= $z and $z <= 23084, "Fluvanna, VA",

22980 <= $z and $z <= 22980, "Waynesboro City, VA",

23001 <= $z and $z <= 23191, "Gloucester, VA",

23002 <= $z and $z <= 23105, "Amelia, VA",

23004 <= $z and $z <= 23936, "Buckingham, VA",

23005 <= $z and $z <= 23192, "Hanover, VA",

23009 <= $z and $z <= 23181, "King William, VA",

23011 <= $z and $z <= 23141, "New Kent, VA",

23014 <= $z and $z <= 23238, "Goochland, VA",

23021 <= $z and $z <= 23163, "Mathews, VA",

23023 <= $z and $z <= 23177, "King And Queen, VA",

23024 <= $z and $z <= 23170, "Louisa, VA",

23027 <= $z and $z <= 23040, "Cumberland, VA",

23030 <= $z and $z <= 23147, "Charles City, VA",

23031 <= $z and $z <= 23180, "Middlesex, VA",

23058 <= $z and $z <= 23294, "Henrico, VA",

23081 <= $z and $z <= 23188, "James City, VA",

23090 <= $z and $z <= 23696, "York, VA",

23101 <= $z and $z <= 23139, "Powhatan, VA",

23112 <= $z and $z <= 23838, "Chesterfield, VA",

23173 <= $z and $z <= 23298, "Richmond City, VA",

23186 <= $z and $z <= 23187, "Williamsburg City, VA",

23301 <= $z and $z <= 23488, "Accomack, VA",

23304 <= $z and $z <= 23898, "Isle Of Wight, VA",

23307 <= $z and $z <= 23486, "Northampton, VA",

23320 <= $z and $z <= 23328, "Chesapeake City, VA",

23432 <= $z and $z <= 23439, "Suffolk City, VA",

23450 <= $z and $z <= 23521, "Virginia Beach City, VA",

23501 <= $z and $z <= 23551, "Norfolk City, VA",

23601 <= $z and $z <= 23628, "Newport News City, VA",

23630 <= $z and $z <= 23681, "Hampton City, VA",

23662 <= $z and $z <= 23662, "Poquoson City, VA",

23701 <= $z and $z <= 23709, "Portsmouth City, VA",

23801 <= $z and $z <= 23875, "Prince George, VA",

23803 <= $z and $z <= 23806, "Petersburg City, VA",

23821 <= $z and $z <= 23920, "Brunswick, VA",

23822 <= $z and $z <= 23894, "Dinwiddie, VA",

23824 <= $z and $z <= 23955, "Nottoway, VA",

23827 <= $z and $z <= 23878, "Southampton, VA",

23834 <= $z and $z <= 23834, "Colonial Heights City, VA",

23839 <= $z and $z <= 23899, "Surry, VA",

23847 <= $z and $z <= 23847, "Emporia City, VA",

23851 <= $z and $z <= 23851, "Franklin City, VA",

23860 <= $z and $z <= 23860, "Hopewell City, VA",

23867 <= $z and $z <= 23897, "Sussex, VA",

23870 <= $z and $z <= 23879, "Greensville, VA",

23901 <= $z and $z <= 23966, "Prince Edward, VA",

23915 <= $z and $z <= 24580, "Mecklenburg, VA",

23923 <= $z and $z <= 23976, "Charlotte, VA",

23938 <= $z and $z <= 23974, "Lunenburg, VA",

23939 <= $z and $z <= 24593, "Appomattox, VA",

24001 <= $z and $z <= 24048, "Roanoke City, VA",

24018 <= $z and $z <= 24179, "Roanoke, VA",

24019 <= $z and $z <= 24438, "Botetourt, VA",

24023 <= $z and $z <= 24162, "Montgomery, VA",

24053 <= $z and $z <= 24185, "Patrick, VA",

24054 <= $z and $z <= 24168, "Henry, VA",

24058 <= $z and $z <= 24347, "Pulaski, VA",

24065 <= $z and $z <= 24184, "Franklin, VA",

24069 <= $z and $z <= 24594, "Pittsylvania, VA",

24072 <= $z and $z <= 24380, "Floyd, VA",

24086 <= $z and $z <= 24167, "Giles, VA",

24095 <= $z and $z <= 24570, "Bedford, VA",

24112 <= $z and $z <= 24115, "Martinsville City, VA",

24127 <= $z and $z <= 24131, "Craig, VA",

24141 <= $z and $z <= 24143, "Radford, VA",

24153 <= $z and $z <= 24157, "Salem, VA",

24201 <= $z and $z <= 24209, "Bristol, VA",

24210 <= $z and $z <= 24361, "Washington, VA",

24215 <= $z and $z <= 24293, "Wise, VA",

24217 <= $z and $z <= 24607, "Dickenson, VA",

24218 <= $z and $z <= 24282, "Lee, VA",

24224 <= $z and $z <= 24649, "Russell, VA",

24239 <= $z and $z <= 24658, "Buchanan, VA",

24244 <= $z and $z <= 24290, "Scott, VA",

24273 <= $z and $z <= 24273, "Norton City, VA",

24292 <= $z and $z <= 24379, "Grayson, VA",

24311 <= $z and $z <= 24375, "Smyth, VA",

24312 <= $z and $z <= 24382, "Wythe, VA",

24314 <= $z and $z <= 24366, "Bland, VA",

24317 <= $z and $z <= 24381, "Carroll, VA",

24333 <= $z and $z <= 24333, "Galax City, VA",

24377 <= $z and $z <= 24651, "Tazewell, VA",

24401 <= $z and $z <= 24402, "Staunton City, VA",

24412 <= $z and $z <= 24487, "Bath, VA",

24413 <= $z and $z <= 24468, "Highland, VA",

24415 <= $z and $z <= 24579, "Rockbridge, VA",

24416 <= $z and $z <= 24416, "Buena Vista City, VA",

24422 <= $z and $z <= 24422, "Clifton Forge City, VA",

24426 <= $z and $z <= 24426, "Covington City, VA",

24448 <= $z and $z <= 24474, "Alleghany, VA",

24450 <= $z and $z <= 24450, "Lexington City, VA",

24501 <= $z and $z <= 24515, "Lynchburg City, VA",

24512 <= $z and $z <= 24588, "Campbell, VA",

24520 <= $z and $z <= 24598, "Halifax, VA",

24521 <= $z and $z <= 24595, "Amherst, VA",

24523 <= $z and $z <= 24523, "Bedford City, VA",

24540 <= $z and $z <= 24544, "Danville City, VA",

24701 <= $z and $z <= 25971, "Mercer, WV",

24716 <= $z and $z <= 25943, "Wyoming, WV",

24801 <= $z and $z <= 24899, "Mcdowell, WV",

24851 <= $z and $z <= 25697, "Mingo, WV",

24901 <= $z and $z <= 25984, "Greenbrier, WV",

24915 <= $z and $z <= 26291, "Pocahontas, WV",

24918 <= $z and $z <= 24993, "Monroe, WV",

24919 <= $z and $z <= 25988, "Summers, WV",

25002 <= $z and $z <= 26680, "Fayette, WV",

25003 <= $z and $z <= 25396, "Kanawha, WV",

25004 <= $z and $z <= 25989, "Raleigh, WV",

25005 <= $z and $z <= 25286, "Roane, WV",

25009 <= $z and $z <= 25529, "Boone, WV",

25011 <= $z and $z <= 25569, "Putnam, WV",

25018 <= $z and $z <= 26617, "Clay, WV",

25022 <= $z and $z <= 25654, "Logan, WV",

25059 <= $z and $z <= 26691, "Nicholas, WV",

25095 <= $z and $z <= 25550, "Mason, WV",

25231 <= $z and $z <= 26173, "Jackson, WV",

25234 <= $z and $z <= 26151, "Calhoun, WV",

25258 <= $z and $z <= 26638, "Gilmer, WV",

25401 <= $z and $z <= 25440, "Berkeley, WV",

25410 <= $z and $z <= 25446, "Jefferson, WV",

25411 <= $z and $z <= 25434, "Morgan, WV",

25431 <= $z and $z <= 26865, "Hampshire, WV",

25501 <= $z and $z <= 25573, "Lincoln, WV",

25504 <= $z and $z <= 25779, "Cabell, WV",

25507 <= $z and $z <= 25709, "Wayne, WV",

26003 <= $z and $z <= 26074, "Ohio, WV",

26030 <= $z and $z <= 26075, "Brooke, WV",

26031 <= $z and $z <= 26055, "Marshall, WV",

26034 <= $z and $z <= 26062, "Hancock, WV",

26101 <= $z and $z <= 26187, "Wood, WV",

26134 <= $z and $z <= 26170, "Pleasants, WV",

26135 <= $z and $z <= 26434, "Tyler, WV",

26138 <= $z and $z <= 26160, "Wirt, WV",

26148 <= $z and $z <= 26421, "Ritchie, WV",

26155 <= $z and $z <= 26581, "Wetzel, WV",

26201 <= $z and $z <= 26237, "Upshur, WV",

26203 <= $z and $z <= 26298, "Webster, WV",

26224 <= $z and $z <= 26296, "Randolph, WV",

26238 <= $z and $z <= 26416, "Barbour, WV",

26260 <= $z and $z <= 26292, "Tucker, WV",

26301 <= $z and $z <= 26568, "Harrison, WV",

26321 <= $z and $z <= 26452, "Lewis, WV",

26328 <= $z and $z <= 26456, "Doddridge, WV",

26335 <= $z and $z <= 26641, "Braxton, WV",

## FAQs

### Can Excel convert Zip Code to county? âș

Get City, County, and State from Zip Codes - YouTube

### How do you populate a column with zip codes based on addresses in Excel? âș

Look up ZIP Codes for Addresses in Excel using Bing Maps - YouTube

### How do I autofill a Zip Code in Excel? âș

**Apply a predefined postal code format to numbers**

- Select the cell or range of cells that you want to format.
- On the Home tab, under Number, on the Number Format pop-up menu. , click Custom.
- In the Format Cells dialog box, under Category, click Special.
- In the Type list, click Zip Code or Zip Code + 4.

### Can Excel look up cities by Zip Code? âș

In Excel 2003, **select Insert menu > PC*MILER Location Lookup**âŠ, then enter a city/state (example: 'Montreal, QC') and click Lookup. All postal codes will be listed for the entered location. Click OK to close the dialog (the selected code won't be entered, this must be done manually).

### How do I VLOOKUP a ZIP code in Excel? âș

Learn Excel 2010 - "VLOOKUP Into A Range of Zipcodes": Podcast #1676

### How can I find the country of a city in Excel? âș

**Start by typing some city names or country names in Excel.** **Select those cells and choose Data, Geography.** **Select the city names and choose Data, Geography**. For each city that is recognized, a map icon will appear in the cell.

### How does Vlookup work in Excel? âș

In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match â indicated as 1/TRUE, or 0/FALSE).

### How do I extract addresses from ZIP codes in Excel? âș

How to Extract the Zip Code in Excel With a Formula : Microsoft Excel Tips

### How do I AutoFill a state in Excel? âș

**Put the mouse pointer over the bottom right-hand corner of the cell until it's a black plus sign.** **Click and hold the left mouse button, and drag the plus sign over the cells you want to fill**. And the series is filled in for you automatically using the AutoFill feature.

### How do I set up index match in Excel? âș

**Follow these steps:**

- Type â=MATCH(â and link to the cell containing âHeightââŠ the criteria we want to look up.
- Select all the cells across the top row of the table.
- Type zero â0â for an exact match.
- The result is that Height is in column â2.â

### How do I add a zip code to an address? âș

**The recipient's address**

- Place the recipient's name on the first line.
- On the second line, write the building number and street name.
- Include the city, state and ZIP code on the final line.

### How do you geocode in Google Sheets? âș

**How to Geocode in Google Sheets**

- Install the API Connector Google Sheets add-on to add the Geocodio API to your spreadsheet. First you will need to install the API Connector Google Sheets add-on. ...
- Create a Geocodio API key. ...
- Organize your addresses in the spreadsheet. ...
- Set up the API Connector. ...
- Implement the ImportAPI function.

### How do I separate ZIP codes in Google Sheets? âș

**Select the column and go to Data > Split text to columns** to start splitting from left to right.

### How do I create a ZIP code in Google Sheets? âș

Google Sheets Custom Number Format: Zip Codes (so ... - YouTube

## Related content

### How to Fill Out Forms using Data Validation and VLOOKUP in Excel âș

Learn how to automatically fill in addresses and contact information with drop-down list menus using Data Validation and VLOOKUP functions in Excel.

Often, youâll find yourself using the same forms over and over again, so it makes sense to automate as much of the process of filling them out as possible.. Iâll show you how to automatically fill addresses and contact information into a template shipping manifestâŠ. It has standard fields for Company Name, Address, City, State, ZIP Code, Phone Number, and Contact Name.. First, we are going to create a drop-down box under the Company Name field in the Shipping Manifest .. Select the data entry cell for Company next to Ship to:. Under the Data menu tab, choose Data Validation and then click on Data Validation.. Select the data entry cell for Address under the company name ( F5 in the example).. To find the correct address information, weâre going to use an Excel function called VLOOKUP() .. The table_array is the set of rows and columns that we want VLOOKUP to scan for a match.. If VLOOKUP doesnât find a match in the table, it throws an error, which isnât good if we need to enter an address that isnât on the Shipper Address list.. The final formula for the Address field is as follows:. The formula for Contact Name will be in cell F9 and is as follows:. The City, State, and ZIP Code data are held in separate cells, so weâll need to stitch them together using multiple VLOOKUP functions.

### How to Auto-Populate Fields in WordPress Forms âș

Do you want to auto-populate fields on your WordPress forms? We'll show you the easy way to use dynamic field choices that automatically update.

You can automatically use information like post types or products to create the options in form fields.. WPForms makes it easy to auto-fill form fields using dynamic field choices.. Reduce form abandonment â by pre-filling fields, you can make forms easier to fill in Improve accuracy â your visitor doesnât have to type in the answers themselves Keep forms up to date â WPForms always shows the most recent items in the form field.. In WPForms , you can use dynamic field choices to auto-populate 3 field types:. In this tutorial, weâre going to auto-populate WooCommerce products on a contact form.. Install the WPForms Plugin Add Your Auto-Populated Field Publish Your Form. Letâs drag a dropdown field and then add auto populated answer choices.. Now weâre ready to add a dynamic field choice to our new dropdown,. Now weâre going to set up the options that will appear in the dropdown list.. When you expand Advanced Options on your dropdown, youâll see 2 choices: Post Type and Taxonomy .. Post Type lets you auto-populate the field from a Dynamic Post Type Source .. You can use custom post types if you have any set up.. The choices in the second dropdown will include options like:. For this tutorial, weâre going to select Post Type and then Products .. Start by clicking Embed at the top of the form builder.

### Can Excel Map Zip Codes? âș

In this blog post, you'll learn how to map zip codes from Excel as zip postal codes and make comparisons among geographical regions.

Value map shapes and colors the chart based on the values, such as inflation rate ; category map on the other hand based on categories, such as countries .. If you prefer to do that with geography data type; input your data which includes geographical values, then go to Data > Data Types > Geography .. Here Excel reads the ZIP codes you entered and creates a map chart based on them.. Excel arranges the colors by default; however, you can format the map chart in your style using design tools.. You can edit map projection, map area, and map labels.. If you do not have one of the latest versions of Excel or you are having issues with using add-ins, a template will generate the zip code map for you.. Someka US Zip Code Heat Map Generator is a customizable Excel template created for converting data into heat maps by zip codes.. To adjust the appearance of the map, the template has color options in the settings section.. Color & Legend Settings If you want to make more changes about color, you will find the âColor & Legend Settingsâ box at the left bottom in the settings section.. If you select no text , then on the zip code areas in the map there will be only colors.. Display zip codes will show the default zip codes and the display text option will show your own texts that you put in the data section in the first place.. Another advantage of this template is that it allows you to use colored maps outside of the template as well.. We covered how to map zip codes in Excel, and also how it is possible within a ready-to-use Excel template.

### Checkout Usability: Auto-Detect âCityâ and âStateâ Inputs Based on the Userâs Postal Code (60% of Sites Donât) âș

Our checkout usability testing consistently shows that auto-detection of "City" and "State" based on the user's ZIP code performs extremely well. Yet, 60% of e-commerce sites don't utilize it.

Despite the significant benefits, our checkout benchmarking reveals that 60% of sites do not auto-detect city and state based on the userâs typed ZIP code.. The benefits of auto-detection observed during testing the past 7 years How auto-detection impacts the sequence of the address form fields Whether âCityâ and âStateâ fields can be hidden entirely Why a fallback solution is always needed Why the auto-detection should kick in with the last digit. Ever since we first usability tested city and state auto-detection features in 2009, weâve observed that users have generally been very positively surprised whenever a site auto-detects the city and state input based on the ZIP code theyâve typed.. When first running usability tests of ZIP code auto-detection in 2009, it was purely observed to be a âdelightâ parameter for users â but over the years, as users more frequently encounter such features on e-commerce sites in general, their general expectations have increased.. Presenting âCityâ and âStateâ beneath the âZIP codeâ field will initially break the traditional address field sequence, at least for US users where the conventional printed address information sequence is âName, Address Line(s), City, State, ZIP.â However, the downside of an unconventional field sequence proved negligible during testing (of US address forms), compared to the gains in completion speed, user delight, and reduced typos.. Hiding the city and state fields has the benefit of presenting users with fewer form fields in the default view â making for a less intimidating appearance of the form (see â The Average Checkout Flow Has 14.88 Form Fields â Twice as Many as Necessary â).. While Home Depot auto-detects city and state based on ZIP code, thereâs no fallback to allow users to edit the auto-detected values.. This user behavior clashes with sites where the city and state auto-detection features require that users leave the field before any change is registered.. During our past 7 years of checkout usability testing weâve observed ZIP-based auto-detection of the userâs city and state to speed up form completion times, eliminate numerous misspellings and typos, and generally cause user delight.

### Auto-Populate Latitude and Longitude in Excel - A.CRE âș

How to add a function to Excel that converts a physical address to latitude and longitude coordinates using Google's Geocoding service.

In this post, I share some VBA code that you can add to your Excel file (together with a Google Geocoding API key) to automate the process of auto-populating latitude and longitude in Excel.. What is less common, but just as easily done, is to use the geocoding API with a custom Excel function or via an Excel Add-In to convert a physical address to latitude and longitude coordinates instantly and without having to leave Excel.. In this tutorial, I show you how to use VBA code to create a custom Excel function.. Note: This function requires you to insert a Google Geocoding API key (which you can get for free â instructions below).. The first option for incorporating Google Geocoding into Excel, is to write a custom function that will take an address and instantly convert it to latitude and/or longitude coordinates using Googleâs geocoding service.. Now if youâre unfamiliar with the concept of custom functions in Excel, a custom function acts like any other function in Excel (e.g.. However, if youâd like this function to be available every time you open up Excel, you might consider installing the A.CRE Geocoding Excel Add-in .. There are a handful of reasons for these errors but generally these errors are because either the function wasnât setup correctly or the Google API key wasnât setup correctly.. My best advice if youâre struggling with one of these error is to: Follow the instructions to the T. I know thatâs easier said than done, but if youâre not saving the file as a Macro-Enabled file, not turning on Microsoft XML 3.0, entering the API key in the wrong place, inadvertently deleting something from the VBA code, or not entering the address correctly, etc, than you will get an error.. While Google gives you a certain number of API requests for free, Google requires users have a credit card on file to avoid abuse of the API.. The second issue with writing a custom function, is that it only exists in that one Excel workbook, which means if you want the function available beyond that Workbook youâll need to create a custom Excel Add-in.. Unfortunately, creating a custom Excel add-in is not as simple as writing a custom function.

### How to convert zip code to state in Excel? âș

Â For example, there is a zip code 29078 in Excel, and you want to covert it to corresponding US state name, any idea? This article will introduce a formula to convert zip codes to US state names in Excel easily.

Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment... More than. 300 powerful features; Works with Office. 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.. Convert zip codes to US state names with formula Please follow below steps to convert zip codes to US state names in Excel:. Convert multiple zip codes to state names with an amazing tool Supposing you have added the zip codes table in your workbook, and you want to convert the zip codes in the G3:G11 to corresponding state names as below screenshot shown.. Now, you can apply the LOOKUP between two values feature of Kutools for Excel to easily convert the zip codes to corresponding state names in bulk.. In the LOOKUP between Two Values dialog, please configure as follows: (1) In the Lookup Values box, please specify zip codes that you will return state names based on; (2) In the Output Values box, please specify the range you will place the returned state names; (3) Itâs optional to check the Replace #N/A error value with a specified value option and enter a value in below box; (4) In the Data range box, please specify the zip code table you have added in your workbook; (5) In The column containing max values box, please specify the Zip Max column in our example; (6) In The column containing min values box, please specify the Zip Min column in our example; (7) In the Return Column box, please specify the State Name column in our example.. Reuse : Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails... Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range ...

### Tips and Tricks for maps (including Bing Maps integration) - Power BI âș

Tips and Tricks for Power BI Map visualizations, visuals, locations, longitude and latitude, and how they work with Bing Maps.

Power BI integrates with Bing Maps to provide default map coordinates (a process called geo-coding) so you can create maps.. The Power BI service and Power BI Desktop send Bing the geo data it needs to create the map visualization.. Data from the Legend bucket (and the Color saturation bucket when you use a Shape Map in Power BI Desktop) is not sent to Bing.. In Power BI Desktop, you can ensure fields are correctly geo-coded by setting the Data Category on the data fields.. For geo-coding, Power BI sends Bing Maps country and state data for North America only.. For geo-coding, Power BI sends Bing Maps state data (no country data) for all locations.. For geo-coding, Power BI sends data for each state and its corresponding country to help Bing Maps geocode more accurately.

### How to Split a County or ZIP Code Territory in Map Business Online? - MapBusinessOnline Blog âș

On occasion, Map Business Online customers may develop a need to split a territory. This could occur because of an excessive customer density within a small area â like a ZIP code.Â Too many customers in a focused area sometimes âŠ Continue reading â

Splitting territory units occurs more commonly in urban areas where territories are based on ZIP codes or Census Tracts, then in rural areas.. Because territories in Map Business Online are usually based on a specific map layer made up of a unique geography segment, the need to split a territory requires some creativity.. Typically, business mapping users base their territories on counties or ZIP codes.. Change the base geographic segment or map layer Create a region out of two or more territories Use draw tools to build the split territory. For instance, if your territory is based on states, you can reconfigure that territory down to counties.. You can always jump from layer to lower layer â from State-based territories to Census Tract territories.. The ZIP code layer is turned on and the original territory area would be queried for ZIP codes and resaved as a ZIP code territory.. Holding down the shift key, the business map user could select as many ZIP codes in the second county area as necessary, to complete the now county-split territory based on Zip codes.. A user could always use a polygon search tool to generate the overall territory boundary map object and then query the ZIP code layer from that polygon.. Then they would create a new territory, covering the county section based on ZIP codes using a polygon tool, querying the ZIP codes and naming the additional territory section.. The new territory section would be saved as a territory name and would be in the territory layer.. In this territory map, Regions will indicate split territories across counties.. Move Away from Map Layer Based Territories and Create Drawn Map Object Territories. Finally, the map user always has the option of simply creating territories as drawn map objects a shape on the map unconnected to a map layer.. A consistent geographic base map layer enables consistent analysis across all territories By building territories on map layers Map Business Onlineâs More Data database tool is available for analysis and reporting Building territories by ZIP codes, Counties or other map layers access Map Business Onlineâs powerful, comprehensive, and growing library of demographic data