LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Deleting blanks from the end of values in cells

Take a look in VBA's help for:

Trim, LTrim, and RTrim

Gord used Application.Trim which is a lot like VBA's trim--except that it gets
rid of extra internal spaces, too. (VBA's Trim just touches the left and right
edges).

application.trim(" Todd Huddlestine ")
and
trim(" Todd Huddlestine ")

Would return different strings.


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


--

Dave Peterson

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting blanks Marianne Excel Discussion (Misc queries) 10 September 10th 08 10:29 AM
Replace values in shaded cells with blanks sue Excel Discussion (Misc queries) 3 January 11th 07 01:20 AM
copy range of cells with blanks then paste without blanks justaguyfromky Excel Worksheet Functions 1 September 3rd 06 07:56 PM
delete values in several cells without deleting the formulas dranreb Excel Discussion (Misc queries) 4 December 9th 04 01:15 AM
Deleting blanks from the end of values in cells Gord Dibben Excel Programming 0 April 1st 04 01:37 AM


All times are GMT +1. The time now is 06:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"