Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 56
Default Change first character in a cell

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?

houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Change first character in a cell

In a "helper" column put:

="32"& RIGHT(A1,LEN(A1)-1)

Copy down.

Copy & Paste Special=Values to remove" formula.

"houghi" wrote:

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?

houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Change first character in a cell

A macro perhaps:-

Sub changefirst()
Dim rcell As Range
Dim Myrange As Range
Dim maxval As Variant
Set Myrange = Range("A1:A100") '<Change to suit
newprefix = "32"
For Each rcell In Myrange
newvalue = newprefix & Mid(rcell.Value, 2, 99)
rcell.Value = newvalue
Next
End Sub

Mike

"houghi" wrote:

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?

houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 56
Default Change first character in a cell

Apparently it contains an error.

Toppers wrote:
In a "helper" column put:

="32"& RIGHT(A1,LEN(A1)-1)

Copy down.

Copy & Paste Special=Values to remove" formula.

"houghi" wrote:

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?



houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 56
Default Change first character in a cell

This works well enough, thanks.

Mike H wrote:
A macro perhaps:-

Sub changefirst()
Dim rcell As Range
Dim Myrange As Range
Dim maxval As Variant
Set Myrange = Range("A1:A100") '<Change to suit
newprefix = "32"
For Each rcell In Myrange
newvalue = newprefix & Mid(rcell.Value, 2, 99)
rcell.Value = newvalue
Next
End Sub

Mike

"houghi" wrote:

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?

houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice



houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Change first character in a cell

Nothing wrong with Toppers' formula.

Apparently you typed or copied incorrectly.

But I see from other post you got the job done.


Gord Dibben MS Excel MVP


On Thu, 24 May 2007 17:04:05 +0200, houghi wrote:

Apparently it contains an error.

Toppers wrote:
In a "helper" column put:

="32"& RIGHT(A1,LEN(A1)-1)

Copy down.

Copy & Paste Special=Values to remove" formula.

"houghi" wrote:

I have a list of +2000 phonenumbers and they are in the format of
012345678 but must become 3212345678, so the first 0 needs to become 32

I searched, but was unable to find a solution. Any idea?



houghi


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the character separating thousands or decimals on. khair Excel Discussion (Misc queries) 3 March 2nd 07 08:43 AM
How to change character to lower case except the first letter? rt Excel Discussion (Misc queries) 2 July 16th 06 12:06 AM
How can I change 255 character limit in 'hyperlink' function? Brad B. Excel Worksheet Functions 0 December 21st 05 09:03 PM
Change character while copy mnr Excel Worksheet Functions 2 June 13th 05 12:44 AM
Copy a column in worksheet with a character change photowiz Excel Worksheet Functions 1 February 5th 05 03:35 PM


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"