Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
doug
Sub TRIM_EXTRA_SPACES() Dim cell As Range For Each cell In Selection If (Not IsEmpty(cell)) And _ Not IsNumeric(cell.Value) And _ InStr(cell.Formula, "=") = 0 _ Then cell.Value = Application.Trim(cell.Value) Next End Sub Gord Dibben Excel MVP On Wed, 23 Jun 2004 14:54:48 -0500, dougmcc1 wrote: I was able to get the macro to replace certain special characters with a space, but now I get some words with many spaces in between them. I use trim to remove the whitespace from the ends of the final output string but how do I remove the whitespace between the words? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extra White Space Between Cells | Excel Discussion (Misc queries) | |||
Extra White Space between Cells | Excel Discussion (Misc queries) | |||
Extra White Space Between Cells | Excel Discussion (Misc queries) | |||
Extra White Space Between Cells | Excel Discussion (Misc queries) | |||
Extra White Space Between Cells | Excel Discussion (Misc queries) |