A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macro to add a comma



 
 
Thread Tools Display Modes
  #1  
Old September 19th, 2007, 05:24 PM posted to microsoft.public.excel.newusers
BrianMultilLanguage
external usenet poster
 
Posts: 2
Default macro to add a comma

I need to add a comma at the end of every cell entry in one column and am
not having any success doing it.
It's gotta be easy for someone.
Help.


  #2  
Old September 19th, 2007, 06:05 PM posted to microsoft.public.excel.newusers
Rodrigo Ferreira
external usenet poster
 
Posts: 74
Default macro to add a comma

BrianMultilLanguage wrote:

I need to add a comma at the end of every cell entry in one column
and am not having any success doing it. It's gotta be easy for
someone. Help.



If the column that you want to add a comma is A, try to put the formula
in column B

=A1 & ","

Copy the formula to others cells in the same column (B)

--
Rodrigo Ferreira
Regards from Brazil
  #3  
Old September 19th, 2007, 06:11 PM posted to microsoft.public.excel.newusers
Sandy Mann
external usenet poster
 
Posts: 2,264
Default macro to add a comma

Rodrigo,

That will add commas to empty cells.

I suggest highlighting the range to be chabged and running:

Sub AddComma()
For Each cell In Selection
If cell.Value "" Then
cell.Value = cell.Value & ","
End If
Next cell

End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Rodrigo Ferreira" wrote in message
...
BrianMultilLanguage wrote:

I need to add a comma at the end of every cell entry in one column
and am not having any success doing it. It's gotta be easy for
someone. Help.



If the column that you want to add a comma is A, try to put the formula
in column B

=A1 & ","

Copy the formula to others cells in the same column (B)

--
Rodrigo Ferreira
Regards from Brazil



  #4  
Old September 19th, 2007, 06:35 PM posted to microsoft.public.excel.newusers
BrianMultilLanguage
external usenet poster
 
Posts: 2
Default macro to add a comma

Terriffic.
Thanks. Worked after I selected the range.


"Sandy Mann" wrote in message
...
Rodrigo,

That will add commas to empty cells.

I suggest highlighting the range to be chabged and running:

Sub AddComma()
For Each cell In Selection
If cell.Value "" Then
cell.Value = cell.Value & ","
End If
Next cell

End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Rodrigo Ferreira" wrote in message
...
BrianMultilLanguage wrote:

I need to add a comma at the end of every cell entry in one column
and am not having any success doing it. It's gotta be easy for
someone. Help.



If the column that you want to add a comma is A, try to put the formula
in column B

=A1 & ","

Copy the formula to others cells in the same column (B)

--
Rodrigo Ferreira
Regards from Brazil





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:50 PM.


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