MLeBlanc
MLeBlanc

Reputation: 57

Extract Multiple text from a cell - Excel

I have a cell with a bunch of text in it. The information I need appears multiple times in the cell but always in different spots.

I have used this to extract the data (1 set) that I need. all the data I need starts with 00710

    =MID(L2,FIND("00710",L2),18)

This returns only one and I need to grab the rest if it appears in the cell. if can appear up to 5 times.

Upvotes: 2

Views: 2803

Answers (1)

lori_m
lori_m

Reputation: 5577

Maybe this for the second occurence:

=MID(L2,FIND("α",SUBSTITUTE(L2,"00710","α",2)),18)

The α is just any character that doesn't appear in your string. You can change the 2 to 3, 4, or 5.

Upvotes: 1

Related Questions