Find & Replace (Adding two characters at begining)

  • Thread starter Thread starter Ty Archer
  • Start date Start date
T

Ty Archer

I have columns with four digits and wish to add two characters "A-" at the
beginning. For example 1123 will be replaced with "A-1123". How can I do
this? Thanks for your help.
 
Two possible ways. One is to use a formula to ge tthe new value

="A-" & text(A1, "0000")
where your value is in cell a1

The other is to just format the cell. This does not change the value of the
cell only how it looks...

Format -> Cells... | Number | Custom
"A-"0000
 
Thanks Jim,

That work great.

Jim Thomlinson said:
Two possible ways. One is to use a formula to ge tthe new value

="A-" & text(A1, "0000")
where your value is in cell a1

The other is to just format the cell. This does not change the value of the
cell only how it looks...

Format -> Cells... | Number | Custom
"A-"0000
 
In a helper column you could have a formula like this:

="A-"&A1

assuming your numbers start in A1. Copy this down, fix the values,
then copy them to overwrite the entries in column A, then delete the
helper column.

Hope this helps.

Pete
 
="A-"&A1
or
="A-"&TEXT(A1,"0000") if the numbers aren't necessarily 4 digits and have
merely been formatted that way,
or, alternatively,
=TEXT(A1,"A-0000")
 
And if your entries are all numeric, you can change how they look (not the real
value) via:

Select the range
format|Cells|Number tab (in xl2003 menus)
Custom category
"A-"0000

The value will still be the numbers, but it'll look pretty.
 
Back
Top