Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Trailing Comma
Good Afternoon-
I am writing a long macro and having a problem with one thing- after concatenating a lot of different text values, and separating them by commas, I have found that some of the composite values have trailing commas at the end. I am having trouble writing something that will say; In this range, if a cell ends in a comma, delete the comma. (but leave all other commas in the range intact) Could anyone direct me to a resource? Thank you. Katie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Trailing Comma
For Each cell In Selection
If Right(cell.Value, 1) = "," Then cell.Value = Left(cell.Value, Len(cell.Value) - 1) End If Next Regards Trevor "Katie" wrote in message ... Good Afternoon- I am writing a long macro and having a problem with one thing- after concatenating a lot of different text values, and separating them by commas, I have found that some of the composite values have trailing commas at the end. I am having trouble writing something that will say; In this range, if a cell ends in a comma, delete the comma. (but leave all other commas in the range intact) Could anyone direct me to a resource? Thank you. Katie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you remove trailing spaces withour Trim function? | Excel Discussion (Misc queries) | |||
Remove Trailing Apostrophe | Excel Discussion (Misc queries) | |||
Excel 2002 : How to remove trailing spaces ? | Excel Discussion (Misc queries) | |||
remove trailing spaces | Excel Discussion (Misc queries) | |||
how do I remove empty spaces trailing a text string? | Excel Worksheet Functions |