Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
edit the contents of a cell using a macro
How can I edit the contents or the string in a cell? For example, if a cell
has text that is followed by blank spaces, I would like a macro to look at the contents of the cell, look for the blank spaces, and then delete the blank spaces. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
edit the contents of a cell using a macro
Hi,
Try something like: Dim cell as Range set cell = Range("A1") 'range a1 of active sheet cell.Value = Trim(cell.Text) 'remove trailing spaces with and reassign to the cell -- Regards, Sébastien <http://www.ondemandanalysis.com "stinson" wrote: How can I edit the contents or the string in a cell? For example, if a cell has text that is followed by blank spaces, I would like a macro to look at the contents of the cell, look for the blank spaces, and then delete the blank spaces. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
edit the cell contents command in Excel 2007 macro | Excel Worksheet Functions | |||
edit macro to mathc entire cell contents | Excel Programming | |||
Edit macro to match entire cell contents | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) |