Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rhall
 
Posts: n/a
Default Spaces in Data


Hi,
I am trying to do a mail merge and the excel data that I am using has a
bunch of spaces in the field that shows the city. So when I list the
City St and Zip the state is about 7 spaces after the city.
123 Main Street


Thanks
RRH


--
Rhall
------------------------------------------------------------------------
Rhall's Profile: http://www.excelforum.com/member.php...o&userid=25630
View this thread: http://www.excelforum.com/showthread...hreadid=390437

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi,

I think, you might need to clean your database. If the "spaces" are real
spaces (and not other non-printable characters usually resulting from
copy/pasting html sources to Excel) you could create a temporary column and
assuming that cities are in column [A] you could write the following formula
in cell [B1] and copy it down:

=TRIM(A1)

After that, select the column [b] press Ctrl+C (to copy), select the column
[A] go to menu EditPaste Special, choose the option 'Values' and press
'OK'. Now you can erase the column [b].

If the function TRIM doesn't remove the "spaces", then try to use the
formula =CLEAN(A1) instead. This function removes all non-printable
characters from string.

And, of course, you could use both functions together, just in case there is
a combination of spaces and other non-printable characters, like this:
=TRIM(CLEAN(A1))

Regards,
KL


"Rhall" wrote in
message ...

Hi,
I am trying to do a mail merge and the excel data that I am using has a
bunch of spaces in the field that shows the city. So when I list the
City St and Zip the state is about 7 spaces after the city.
123 Main Street


Thanks
RRH


--
Rhall
------------------------------------------------------------------------
Rhall's Profile:
http://www.excelforum.com/member.php...o&userid=25630
View this thread: http://www.excelforum.com/showthread...hreadid=390437



Reply
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
Spaces in Data Rhall Excel Discussion (Misc queries) 5 July 27th 05 04:43 AM
How do I compare 2 sets of data and highlight differences? Perplexed1 Excel Worksheet Functions 1 July 9th 05 01:15 AM
How do I import formmail data to a custom excel template? cxlough41 Excel Worksheet Functions 1 July 1st 05 12:59 AM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM


All times are GMT +1. The time now is 12:28 AM.

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

About Us

"It's about Microsoft Excel"