ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   macro to add a comma (https://www.excelbanter.com/new-users-excel/158904-macro-add-comma.html)

BrianMultilLanguage

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.



Rodrigo Ferreira

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

Sandy Mann

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




BrianMultilLanguage

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






Sandy Mann

macro to add a comma
 
I'm glad that it worked for you, thank for the feedback.

--
Regards,

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


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


"BrianMultilLanguage" wrote in message
...
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










All times are GMT +1. The time now is 06:25 AM.

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