Find & Replace (Adding two characters at begining)

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.
 
J

Jim Thomlinson

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
 
T

Ty Archer

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
 
P

Pete_UK

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
 
D

David Biddulph

="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")
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top