Forum Discussion

Modnar1's avatar
Modnar1
Copper Contributor
Feb 12, 2022

Text field may contain a 5 digit code, and if so need to extract it to its own column

So my title data sometimes contains a code that tells me important information about the item, my ultimate goal is to use this code with a vlookup function to autofill other fields. My problem is that it is intermingled with other information ex:

13112 Way to Celebrate Men's & Big Men's Hoppy Halloween Graphic Tee Small

I think what I need is a function that will see that there is a 5 digit numeric value contained within the text and move only that number to a new field that I could then use for the vlookup function.

2 Replies

  • Hello Modnar1 

     

    If they data are in the same format (the numbers you need to extract) is 5 digits and always at the beginning of the text, then you would use this formula

    =LEFT(A1,5)   --> this way the result will be 13112 as a text 

    =NUMBERVALUE(LEFT(A1,5))  --> the result will be converted into numbers, 

Resources