April 11, 2010

Extracting a type of text in a range of cells:

In case, if you have a same kind of data in a range of cells and you would like extract a particular data from that range. We can do that, please look into the below example and formula,




n the above example, we have name of persons in the cell A1 to A3 and they are not in the same length. We have extracted the name of persons in the cell C1 to C3. We have used =MID(A1,12,LEN(A1)-11) formula to do that. The first 11 characters in A1 is “Last Name: ” and we do not know the length of name of the person, since we can’t predict the length of name of the each person.

We had counted the number of characters in cell A1 and we subtracted that 11 characters which builds the first part (Last Name: ) of the sentence and now we got the number of character exist in the name of the person.

The formula above, will extract the characters from 12th position and up to the length of name of the individual.

No comments:

Post a Comment