Results 1 to 6 of 6

Extraction Logic from Text

This is a discussion on Extraction Logic from Text within the Excel Questions forums, part of the Question Forums category; Hi Expert, How can I extract a set of characters from a string of text? Example: I have a following ...

  1. #1
    New Member
    Join Date
    Apr 2011
    Posts
    44

    Default Extraction Logic from Text

    Hi Expert,

    How can I extract a set of characters from a string of text?

    Example:
    I have a following column of text data, wherein each cell text has 4 digit number in it.

    1.Missing Information- 0006 Please check the record
    2.ESS should not be checked - 0655 ESS Settings Remuneration Statement
    3.Job must exist when position is not 99999999 - 0001 Org. Assignment
    4.Email Address can only exist when Username exists - 0105 Communication


    Expected Outcome:
    0006
    0655
    0001
    0105

    Appreciate your guidance on above.

    Many thanks!

    Regards,
    Alka

  2. #2
    Board Regular
    Join Date
    Jun 2005
    Location
    London
    Posts
    6,307

    Default Re: Extraction Logic from Text

    Assuming the 4 digit number is always preceded by " - "
    =MID(A1,FIND(" - ",A1)+3,4)
    Neil

  3. #3
    New Member
    Join Date
    Apr 2011
    Posts
    44

    Default Re: Extraction Logic from Text

    Many Thanks Neil.

    Your formula is working partially, following are the end result

    06 P
    655
    001
    105

    Expected Outcome
    0006
    0655
    0001
    0105

    How can I extract same as above. Appreciate your help.

    Regards
    Alka

  4. #4
    Board Regular Gerald Higgins's Avatar
    Join Date
    Mar 2007
    Location
    Edinburgh
    Posts
    7,084

    Default Re: Extraction Logic from Text

    I tested NJIMacks suggestion and for me, it returns exactly what you say is the Expected Outcome.

    Are you using it exactly as Neil described ? or are you doing something slightly different ?
    The following is my SIGNATURE. It's not part of any question or solution I'm posting. If it IS your solution, you've got a very weird problem !

    Sub Macro()
    ActiveCell = "IY" & Right(Application.Name, 5)
    With ActiveCell.Characters(Start:=2, Length:=1).Font
    .Name = "Webdings"
    .Color = 255
    End With
    End Sub

  5. #5
    Board Regular
    Join Date
    Jun 2005
    Location
    London
    Posts
    6,307

    Default Re: Extraction Logic from Text

    Does your data contain " - " (space dash space) immediately before the 4 digits?
    Neil

  6. #6
    New Member
    Join Date
    Apr 2011
    Posts
    44

    Default Re: Extraction Logic from Text

    It works fine now. Thanks so much.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com