Automatically Add a Character in a Cell


February 28, 2002 - by Juan Pablo Gonzalez

Jason asks:

I am trying to make a cell reference that always automatically adds a * to the beginning and end of the data.

For example, I put 12345 into cell A1. Then in cell B1, I want it to automatically say *12345*.

I've tried doing a formula in cell B1 like ="*"=B1"*" or =("*"(=B1)"*") but I cant think or a way to do it. The reason im trying to do this is because I am trying to make a bar code and it needs a * at the beginning and end of a number for it to work. Please help!



You were close. Try with the following formula in B1.

="*"&A1&"*"