Adding letters to an existing column of numbers

%3CLINGO-SUB%20id%3D%22lingo-sub-2203054%22%20slang%3D%22en-US%22%3EAdding%20letters%20to%20an%20existing%20column%20of%20numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203054%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20know%20how%20I%20can%20add%20letters%20to%20an%20existing%20column%20of%20numbers.%20I%20need%20to%20add%20the%20same%20two%20letters%20before%20each%20group%20of%20numbers.%20Flash%20fill%20is%20not%20doing%20it%20for%20me%2C%20or%20I'm%20doing%20it%20wrong.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2203054%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I need to know how I can add letters to an existing column of numbers. I need to add the same two letters before each group of numbers. Flash fill is not doing it for me, or I'm doing it wrong.

4 Replies

Hi @Katstorm 

 

You can use two options to add letters with numbers, one is through custom format as mentioned below: Simply select the whole column (or required rows) and define custom format as "AB"###0

tauqeeracma_0-1615487165611.png

Alternatively you can use Concat() function to add desired text with numbers.

 

Thanks

Tauqeer

 

I just want to f/u on @tauqeeracma 's excellent suggestions.

The 1st option using Custom Number Format is quick & easy but has additional benefit/potential issue to note. Using this Custom Number Format will ONLY change how those cells are DISPLAYED. That means the VALUE in the cell is still the same. This is great if you might have other cells that you want to perform math on those values (e.g. =IF(A3+5>=A4, ... ) but if you want to use those cells in a lookup/comparison (e.g. =VLOOKUP(A3, ... ) you need to realize those letter prefix are not really there. If this is for display only, then it doesn't matter.

The 2nd option is using a helper column ="AB"&A3 or using dynamic arrays ="AB"&A3:A9. In this case the new VALUE in the cell actually has the letters included. If you don't want the extra column you can copy and 'paste values only' on top of Col A and then delete that helper column.
Appreciate the info, it worked with a slight modification. As @mtarler had mentioned your 1st suggestion works if I don't need the underlying code and just need the visual. However as these numbers are from product code and I would be uploading to a database, I need it to read the whole thing. I took a short cut, I used your suggestion to format the range of cells using the "AB"####, then copied and pasted into OneNote, then copied and pasted back and it worked. Thanks for the hand up, it's appreciated.

@Katstorm 

 

you are welcome, glad to help