Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Todd
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, 31 Mar 2004 06:50:42 -0800, "Todd Huttenstine" wrote: I have a very big range of data on a worksheet. The range is located on worksheet Renewals A:F. Another worksheet Wkly Renewals has a pivot table referencing that range. Some values in the range may have a space (" ") at the end of the value and needs to be removed. For example cell D205 should be "Todd Huttenstine" but instead it is "Todd Huttenstine " or cell D206 may have the value "Randy " instead of "randy". I need these spaces removed with code because my pivot table is showing duplicates due to this space. The pivot tables looks at this as 2 different values because technically the space makes it that way. Any help is appreciated. Todd Huttenstine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting blanks | Excel Discussion (Misc queries) | |||
Replace values in shaded cells with blanks | Excel Discussion (Misc queries) | |||
copy range of cells with blanks then paste without blanks | Excel Worksheet Functions | |||
delete values in several cells without deleting the formulas | Excel Discussion (Misc queries) | |||
Deleting blanks and shifting left - cont. | Excel Programming |