Hello,
I am trying to extract specific data from data descriptions with varying lengths. For example:
So in better words, I am trying to take the first letter of each piece of data, followed by the hyphen and then all the numbers. The examples have varying length before the hyphen as well as after. Additionally, some examples have a letter at the end of the numbers which needs to be removed.
I have been using the following formula to remove the letter at the end, if there is one:
=IF(ISNUMBER(--RIGHT(A1)),A1,LEFT(A1,LEN(A1)-1))
For the single letter before the hyphen I have tried using the LEFT function but I am uncertain how to mix the two together, maybe it requires a different solution altogether. Any help on this would be greatly appreciated!
Cheers,
Jamie
I am trying to extract specific data from data descriptions with varying lengths. For example:
So in better words, I am trying to take the first letter of each piece of data, followed by the hyphen and then all the numbers. The examples have varying length before the hyphen as well as after. Additionally, some examples have a letter at the end of the numbers which needs to be removed.
I have been using the following formula to remove the letter at the end, if there is one:
=IF(ISNUMBER(--RIGHT(A1)),A1,LEFT(A1,LEN(A1)-1))
For the single letter before the hyphen I have tried using the LEFT function but I am uncertain how to mix the two together, maybe it requires a different solution altogether. Any help on this would be greatly appreciated!
Cheers,
Jamie