-2

My cell looks like this 3s4446V6PK1HVGT, I want to change it to look like this, PK1HVGT after the formula is done.

The pretext is different for all cells but the outcome will be 7 characters long after the formula starting with The PK in the data input.

I was looking for a formula to do this but could not find one can somebody help please ?

5
  • 1
    You need to provide more info. Is pretext same for all cells or is it a single cell you are trying to change? Feb 1, 2016 at 14:39
  • 1
    Are there any criteria for changing the cell contents? Is it always the right 7 letters you want?
    – Mokubai
    Feb 1, 2016 at 14:39
  • The pretext is different for all cells but the outcome will be 7 characters long after the formula starting with The PK in the data input.
    – Dewey
    Feb 1, 2016 at 14:47
  • yes the right 7
    – Dewey
    Feb 1, 2016 at 14:50
  • THX everybody awesome help...
    – Dewey
    Feb 1, 2016 at 14:56

2 Answers 2

1

If you want to keep the last 7 characters, then just use:

=RIGHT(A1,7)

1

If your data is in cell A1 then your formula in B1 must be:

=RIGHT(A1,LEN(A1)-FIND("PK",A1,1)+1)

This formula works no matter how many characters you need to extract from the cell.

It will extract all the characters to the right of the first PK it finds including the PK string.

Not the answer you're looking for? Browse other questions tagged .