ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   phone numbers (https://www.excelbanter.com/new-users-excel/73351-phone-numbers.html)

bylsma

phone numbers
 

Hi I'm stuck on this one I want to add a 1 to my phone list. I have
removed all spaces and other signs to create a number such as from
(201) 276-2143 to 2012762143 Now I need to add a 1 to the whole column
of about 52,000.
to make it 12012762143, and of course add the 1 to all the numbers in
the column individually. Then change all this to a CSV file I can
upload . Whew!
Is there anyone out there who can help!! Thanks bylsma


--
bylsma
------------------------------------------------------------------------
bylsma's Profile: http://www.excelforum.com/member.php...o&userid=31829
View this thread: http://www.excelforum.com/showthread...hreadid=515527


Paul B

phone numbers
 
bylsma, here is one way,

Sub Add_1()
'will add 1 in front of what's in the used range in column A
Set rng = Intersect(Range("A:A"), ActiveSheet.UsedRange)
For Each c In rng
c.Value = "1" & c
Next
End Sub

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to insert,
module, and paste the code in the window that opens on the right hand side,
press Alt and Q to close this window and go back to your workbook and press
alt and F8, this will bring up a box to pick the Macro from, click on the
Macro name to run it. If you are using excel 2000 or newer you may have to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"bylsma" wrote in
message ...

Hi I'm stuck on this one I want to add a 1 to my phone list. I have
removed all spaces and other signs to create a number such as from
(201) 276-2143 to 2012762143 Now I need to add a 1 to the whole column
of about 52,000.
to make it 12012762143, and of course add the 1 to all the numbers in
the column individually. Then change all this to a CSV file I can
upload . Whew!
Is there anyone out there who can help!! Thanks bylsma


--
bylsma
------------------------------------------------------------------------
bylsma's Profile:

http://www.excelforum.com/member.php...o&userid=31829
View this thread: http://www.excelforum.com/showthread...hreadid=515527




CLR

phone numbers
 
Assuming your list is in Column A, you can CONCATENATE the 1 in by putting
this formula in B1 and copying down, then Copy PasteSpecial Values on
column B and delete column A if you wish.....

=1&A1

Vaya con Dios,
Chuck, CABGx3


"Paul B" wrote in message
...
bylsma, here is one way,

Sub Add_1()
'will add 1 in front of what's in the used range in column A
Set rng = Intersect(Range("A:A"), ActiveSheet.UsedRange)
For Each c In rng
c.Value = "1" & c
Next
End Sub

To put in this macro, from your workbook right-click the workbook's icon

and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to

insert,
module, and paste the code in the window that opens on the right hand

side,
press Alt and Q to close this window and go back to your workbook and

press
alt and F8, this will bring up a box to pick the Macro from, click on the
Macro name to run it. If you are using excel 2000 or newer you may have

to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it

to
medium

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"bylsma" wrote in
message ...

Hi I'm stuck on this one I want to add a 1 to my phone list. I have
removed all spaces and other signs to create a number such as from
(201) 276-2143 to 2012762143 Now I need to add a 1 to the whole column
of about 52,000.
to make it 12012762143, and of course add the 1 to all the numbers in
the column individually. Then change all this to a CSV file I can
upload . Whew!
Is there anyone out there who can help!! Thanks bylsma


--
bylsma
------------------------------------------------------------------------
bylsma's Profile:

http://www.excelforum.com/member.php...o&userid=31829
View this thread:

http://www.excelforum.com/showthread...hreadid=515527







All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com