+ Reply to Thread
Results 1 to 3 of 3

Trying to extract unit number from an address

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    3

    Post Trying to extract unit number from an address

    Hi so I can a column of data which contains addresses, and I would like to extract the unit number from these addresses.

    Example: BLK 307 TAMPINES STREET 32 #04-94 Singapore 520307
    I would like to extract #04-94

    Note that there are some address which unit numbers like #01-123

    Any help or tips would be appreciated. Thanks

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Trying to extract unit number from an address

    welcome to the forum. how about just:
    =TRIM(MID(A1,FIND("#",A1),7))

    you posted this in the VBA section though. so maybe:
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    12-01-2017
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Trying to extract unit number from an address

    Many thanks to you! Very effective!

+ 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. Replies: 4
    Last Post: 10-07-2015, 06:04 AM
  2. [SOLVED] extract an address from multple words and a number in a cell
    By excelZen in forum Excel General
    Replies: 5
    Last Post: 01-30-2015, 03:37 PM
  3. [SOLVED] Unit increase relative to variable unit thresholds
    By Fr3dle in forum Excel General
    Replies: 6
    Last Post: 07-01-2013, 06:57 AM
  4. Replies: 5
    Last Post: 06-26-2013, 06:16 PM
  5. Extract House Number from Street Address into new Cell
    By tamorgen in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-20-2011, 07:48 AM
  6. Check unit number against list
    By todmac in forum Excel General
    Replies: 1
    Last Post: 09-12-2011, 07:25 PM
  7. extract street number from address
    By rickshadey in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-23-2008, 08:51 PM

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