Extract the text between last comma and last but one comma.

S

Sreedevi

I have a very long text in a cell. EX:
4919,"0.019999","7.2.84.192","10.160.18.52","RTP","PT=Unknown (99), SSRC=0x0,
Seq=343, Time=514216 "

I need to extract only the Seq=343 portion of it. The length of the text is
not constant in all the rows. Also, the sequence number is sometimes 2/3/4/5
digit.

Please help
 
T

T. Valko

*Maybe* this:

=LEFT(MID(A1,SEARCH("seq=",A1),255),FIND(",",MID(A1,SEARCH("seq=",A1),255))-1)

Returns: Seq=343
 
D

Dave Peterson

If you only want to keep the Seq=###, you could do this, too:

Select the range to fix
Edit|Replace
what: *Seq (asterisk, Seq)
with: Seq
Replace all
Then
Edit|Replace
what: ,* (comma, asterisk)
with: (leave blank)
replace all

The asterisk is a wildcard that represents any set of characters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top