+ Reply to Thread
Results 1 to 3 of 3

Extract data from cells

Hybrid View

  1. #1
    Registered User
    Join Date
    12-08-2011
    Location
    Melbourne
    MS-Off Ver
    MAC Excel 2010
    Posts
    2

    Extract data from cells

    Hey all,

    I was hoping someone could help me out. I have a huge spreadsheet with addresses and need to extract the location. The address is on multiple lines within the cell. Please see the example below. The locations highlighted in red is the data i need to extract. All the addresses have Victoria and a postcode on the end if that helps.

    Any assistance would be much appreciated.

    "BARWON VALLEY LODGE
    Address: 99 Barrabool Rd, Belmont, Victoria 3216
    Phone: 03 5247 2500 | Fax: 03 5244 3377
    Email: reception@barwonvalleylodge.com.au"

    "BAY BREEZE ACCOMMODATION PORT CAMPBELL
    Address: 7350 Cobden Port Campbell Rd, Port Campbell, Victoria 3269
    Phone: 03 5598 6167 | Mobile: 0437 550 276 | Fax: 03 5598 6167
    Email: bay.breeze.portcampbell@hotmail.com"

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Extract data from cells

    Try this,

    =TRIM(RIGHT(SUBSTITUTE(LEFT(A1,SEARCH("Victoria",A1)-1),",",REPT(" ",100)),200))

    Or,

    =TRIM(MID(A1,FIND(",",A1)+1,FIND(",",A1,FIND(",",A1)+1)-FIND(",",A1)-1))
    Last edited by Haseeb Avarakkan; 12-08-2011 at 07:46 PM.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    12-08-2011
    Location
    Melbourne
    MS-Off Ver
    MAC Excel 2010
    Posts
    2

    Re: Extract data from cells

    Thank you. The top code fix my problem. Thanks again

+ 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