Simple (I hope) Excel macro question.

Supposing you need to go through a column of numbers and insert a (constant) alpha prefix to each number, how could you do this with VB?

Say column “B” contains these values:

B1=“4”
B2= “8”
B3=“15”
B4=“16”
B5=“23”
B6=“42”

(and so on for 20,000 rows or so)

What I want is for the column to contain these alphanumeric values:

B1=“X4”
B2=“X8”
B3=“X15”
B4=“X16”
B5=“X23”
B6=“X42”

…and so on. Just an “X” in front of the original numbers.

I am embarrassed to ask for help with this, but I think I’m getting stuck on the numeric --> alphanumeric thing.

Thanks!

Couldn’t you just use the CONCATENATE function?

:smack:

Yes, that works fine, individually. I still can’t quite work out how to do this simple operation on all the cells in the column, though.

Hallelujah, the idjit figured it out.

Thank you, Kid_A. That was actually white-light helpful. (I was trying to do it a much more complicated way.)