+ Reply to Thread
Results 1 to 7 of 7

Macro to show all codes for cities

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Macro to show all codes for cities

    hello

    i have a list of codes (over 30k) for a list of districts

    i have a working formula in column E that list all the codes for one branch i.e. New york

    can someone pls help me so that a macro or a logical formula can be in place so it list all the codes for new york and then for boston?

    ive been struggling with this for the past 2 days.

    *see attached below*

    i really really appreciate it.

    basically i would like for it to look like this

    column D....column E
    Branch zip-code
    New York 6565
    6568
    6562
    6564
    6563
    Long Island 87989
    87981
    87980
    87984

    when i change the district in column C, then the branch listing changes in drop down in column D....so then the zip codes would change

    im really and be gratefuly.

    pls and thx u again!
    Attached Files Attached Files
    Last edited by jw01; 01-10-2012 at 12:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Macro to show all zip codes for cities

    why not just autofilter the sheet zip-code
    select this sheet
    assume no blank in data in this sheet
    select A1
    data-filter-autofilter
    arrows in all columns
    click arrow in column "district"
    choose newyork-longisland
    you get data for only district "newyork longisland"
    copy filtered data to some other location
    again select A1 click data-filter-autofilter
    autofilter is removed and full data is seen.


    you may be insterested in seeing the golden rules how the data base has to be first created for easy manipulation

    http://www.ozgrid.com/forum/showthread.php?t=76234
    Last edited by venkat1926; 01-10-2012 at 02:30 AM.

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro to show all zip codes for cities

    Try it. Select Region from the drop-down list in B15, then District in C15, Branch and Zip filled in automatically.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: Macro to show all zip codes for cities

    hey nilem

    omg that is just amazing!

    exactly what i was looking for....the only thing is...i have to insert some rows so hopefully it doesnt mess things up!

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: Macro to show all zip codes for cities

    nilem

    quick question

    i have a macro for workbook protection....how can i embed that into your macro?

    password is techrm

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro to show all zip codes for cities

    Probably do not. Can you show your macro?

  7. #7
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: Macro to show all codes for cities

    hello nilem

    one question for u...i have the following macro in place to protect and unprotect worksheet...however if the worksheet is protected....the macro u have fail to work....what code can i place? thx u sir

    Please Login or Register  to view this content.
    see attached...when i try to change the code...it says the workbook is protected....thxs for ur help again!
    Attached Files Attached Files
    Last edited by jw01; 01-25-2012 at 03:25 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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