ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   adding a semicolon (https://www.excelbanter.com/new-users-excel/215207-adding-semicolon.html)

RaY

adding a semicolon
 
I have a column of over 500 9 digit numbers. What I need is to add a
semicolon at the end of each individual number in its's cell - these
number references will be eventually copied into another application
to retrieve their associated data. I have tried to record a macro in
order to do this but it only replicates the same numbers (with the
semi colon) each time it is run.

Is there a way of of doing this ?

ActiveCell.FormulaR1C1 = "'385743341;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'538712414;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'603366470;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'455411095;"
ActiveCell.Offset(1, 0).Range("A1").Select

Thanks in advance.

Ray

Harald Staff[_2_]

adding a semicolon
 
answered in the .excel group. Please don't multipost.

"RaY" wrote in message
...
I have a column of over 500 9 digit numbers. What I need is to add a
semicolon at the end of each individual number in its's cell - these
number references will be eventually copied into another application
to retrieve their associated data. I have tried to record a macro in
order to do this but it only replicates the same numbers (with the
semi colon) each time it is run.

Is there a way of of doing this ?

ActiveCell.FormulaR1C1 = "'385743341;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'538712414;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'603366470;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'455411095;"
ActiveCell.Offset(1, 0).Range("A1").Select

Thanks in advance.

Ray



RaY

adding a semicolon
 
Ok. Thanks for the response.
Cheers. Ray

On Sat, 3 Jan 2009 02:10:36 +0100, "Harald Staff"
wrote:

answered in the .excel group. Please don't multipost.

"RaY" wrote in message
.. .
I have a column of over 500 9 digit numbers. What I need is to add a
semicolon at the end of each individual number in its's cell - these
number references will be eventually copied into another application
to retrieve their associated data. I have tried to record a macro in
order to do this but it only replicates the same numbers (with the
semi colon) each time it is run.

Is there a way of of doing this ?

ActiveCell.FormulaR1C1 = "'385743341;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'538712414;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'603366470;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'455411095;"
ActiveCell.Offset(1, 0).Range("A1").Select

Thanks in advance.

Ray


Shane Devenshire[_2_]

adding a semicolon
 
Hi,

Here is one way.

Sub AddSemiColon()
For Each Cell In Selection
Cell.Value = Cell & ";"
Next Cell
End Sub

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"RaY" wrote:

I have a column of over 500 9 digit numbers. What I need is to add a
semicolon at the end of each individual number in its's cell - these
number references will be eventually copied into another application
to retrieve their associated data. I have tried to record a macro in
order to do this but it only replicates the same numbers (with the
semi colon) each time it is run.

Is there a way of of doing this ?

ActiveCell.FormulaR1C1 = "'385743341;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'538712414;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'603366470;"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "'455411095;"
ActiveCell.Offset(1, 0).Range("A1").Select

Thanks in advance.

Ray



All times are GMT +1. The time now is 07:45 AM.

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