+ Reply to Thread
Results 1 to 5 of 5

Value on the right and on the left of a specific character

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    portugal
    MS-Off Ver
    2016
    Posts
    9

    Value on the right and on the left of a specific character

    Chiswell Street Nš1567 2000-232 London

    Abbey Road 2718 5000-010 Manchester



    I need to extract into a cell the 4 numbers on the left of - and the 3 numbers on the right of - to another cell.

    This postal code will always appear in the same structure, 4 numbers with - in the middle and 3 numbers after.

  2. #2
    Forum Contributor
    Join Date
    05-20-2008
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Value on the right and on the left of a specific character

    =mid(c16,find("-",c16)-4,4)
    =mid(c16,find("-",c16)+1,3)

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Value on the right and on the left of a specific character

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-01-2017
    Location
    portugal
    MS-Off Ver
    2016
    Posts
    9

    Re: Value on the right and on the left of a specific character

    On both solutions I get "#NAME?"

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Value on the right and on the left of a specific character

    No reason why you should get that. Have you typed it or copied it?

+ 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. [SOLVED] left padding (with given character)
    By acolbrantNMBS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2019, 08:53 AM
  2. [SOLVED] Question about LEFT function-How to return a specific character of a string.
    By llomax83 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2016, 02:09 PM
  3. Code to delete text left of a specific character
    By Yoshi64 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-21-2014, 05:38 AM
  4. [SOLVED] How to use LEFT and RIGHT to delete last character
    By nicolaivinther in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2014, 09:53 AM
  5. [SOLVED] Find text left or right of a specific character in a text string
    By Locopete99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2014, 05:55 AM
  6. Replies: 3
    Last Post: 11-20-2012, 10:03 PM
  7. [SOLVED] Left/Right function in VBA, finding a specific starting character
    By astronut325 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2012, 01:26 AM

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