Assuming the 4 digit number is always preceded by " - "
=MID(A1,FIND(" - ",A1)+3,4)
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 ...
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
Assuming the 4 digit number is always preceded by " - "
=MID(A1,FIND(" - ",A1)+3,4)
Neil
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
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
Does your data contain " - " (space dash space) immediately before the 4 digits?
Neil
It works fine now. Thanks so much.
Bookmarks