+ Reply to Thread
Results 1 to 4 of 4

Grouping Weather by Zipcodes: Help!

  1. #1
    Registered User
    Join Date
    02-08-2019
    Location
    Los Angeles
    MS-Off Ver
    MAC 16.21.1
    Posts
    7

    Grouping Weather by Zipcodes: Help!

    Hi!

    I'd first like to thank you all in advance for all the help you provide in this forum.

    My challenge is that I'm trying to group Zip codes by like-weather regions. I've found a website that groups weather by the first 3 digits of the zipcode -- you can google "weather by zip code" and the site is Wunderground (attempting to replicate this site in excel).

    I'm trying to replicate the above site in excel but in groups of 5. I have two challenges: I need help on a function that will group like-zipcodes by the first 3 digits, and once those are grouped into like-zipcodes, I need to be able to group that list by 5.

    Example for zip codes beginning "913"
    Group 1
    (91301) Agoura Hills, California
    (91302) Calabasas, California
    (91303) Canoga Park, California
    (91304) Canoga Park, California
    (91305) Canoga Park, California
    Group 2
    (91306) Winnetka, California
    (91307) West Hills, California
    (91308) West Hills, California
    (91309) Canoga Park, California
    (91310) Castaic, California
    Group 4
    (91311) Chatsworth, California
    (91313) Chatsworth, California
    (91316) Encino, California
    (91319) Newbury Park, California
    (91320) Newbury Park, California
    Group 5
    (91321) Newhall, California
    (91322) Newhall, California
    (91324) Northridge, California
    (91325) Northridge, California
    (91326) Porter Ranch, California
    Group 6
    (91327) Northridge, California
    (91328) Northridge, California
    (91329) Northridge, California
    (91330) Northridge, California
    (91331) Pacoima, California
    Group 7
    (91333) Pacoima, California
    (91334) Pacoima, California
    (91335) Reseda, California
    (91337) Reseda, California
    (91340) San Fernando, California
    Group 8
    (91341) San Fernando, California
    (91342) Sylmar, California
    (91343) North Hills, California
    (91344) Granada Hills, California
    (91345) Mission Hills, California

    Please let me know if you have any questions.

    Best

  2. #2
    Registered User
    Join Date
    02-08-2019
    Location
    Los Angeles
    MS-Off Ver
    MAC 16.21.1
    Posts
    7

    Re: Grouping Weather by Zipcodes: Help!

    Eh, I think I solved it. First grouped by like Regions due to similar weather, then ascended by zipcode. Naturally ascending them groups by first three digits, then grouped by 5 based of a combing function. Total around 8,200 groups (5 zipcodes per). Looks like it worked for my needs, thanks all !

  3. #3
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Grouping Weather by Zipcodes: Help!

    Probably a cleaner method , but this worked for me. First, sort your zip codes. Let's assume your codes are in A1:A100.
    In Cell B1 type a 1.
    In Cell C1 type a 1.
    In Cell B2 type =IF(AND(B1<5,INT(A1/100)=INT(A2/100)),B1+1,1) and drag that down to B100.
    In Cell C2 type =IF(B2=1,C1+1,C1) and drag that down to C100.

    Column C has your group numbers.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  4. #4
    Registered User
    Join Date
    02-08-2019
    Location
    Los Angeles
    MS-Off Ver
    MAC 16.21.1
    Posts
    7

    Re: Grouping Weather by Zipcodes: Help!

    Thanks for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Match Zipcodes across 2 sheets
    By tgpollock in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-25-2018, 09:16 PM
  2. Adding communities to zipcodes:
    By ldr8790 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2015, 08:22 AM
  3. looking up zipcodes from another workbook
    By ilostmygummy in forum Excel General
    Replies: 3
    Last Post: 06-28-2015, 10:07 AM
  4. Return value after searching 3 col's of zipcodes
    By Oscar Fox in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-13-2011, 03:37 AM
  5. VBA to fix ZipCodes
    By davidsons in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2011, 11:27 AM
  6. Macro to fix zipcodes
    By martinez_pedro in forum Excel General
    Replies: 3
    Last Post: 03-31-2009, 01:42 PM
  7. Vlook up and Zipcodes
    By ChefBacon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2009, 11:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1