Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting 00 in front of a number 1

Status
Not open for further replies.

Terridian

MIS
Jun 6, 2001
8
0
0
NZ
Hi,

I have a list of country codes which are formatted as text cells. What I need to do is insert "00" in front of these numbers so I can then import the final number into a database.

Example: Current number = 91. Required number = 0091.

Is it possible to do this? If so, how?

Thanks in advance

Alex

 
Hi there,

If 91 was in cell A1, you could put this in A2

="00"&A1

HTH,

Peter

Remember- It's nice to be important,
but it's important to be nice :)
 
Just in case any of your country codes are different to a 2 digit format, and as long as your country codes are numerical you can use the following to give you 4 digit no matter what:-

=TEXT(A1,"0000")

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Downside to that being that the OP said the data is for importing into a database, so just formatting it won't necessarily give you what you need.

Regards
Ken...........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top