Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 like this. 123 Main Street Anywhere usa 49000 Any ideas? Thanks RRH -- Rhall ------------------------------------------------------------------------ Rhall's Profile: http://www.excelforum.com/member.php...o&userid=25630 View this thread: http://www.excelforum.com/showthread...hreadid=390428 |
#2
|
|||
|
|||
I guess the space removal feature made that question fall flat. If you wish to remove the spaces from your data, use =trim(A1) or =trim(A1&" "&A2&" "&A3) If you wanted to insert more spaces, then =A1&" "&A3 should help -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059 View this thread: http://www.excelforum.com/showthread...hreadid=390428 |
#3
|
|||
|
|||
So do you mean to format the whole column with =trim(g1) Sorry, I don't know much about this yet. Ramona -- Rhall ------------------------------------------------------------------------ Rhall's Profile: http://www.excelforum.com/member.php...o&userid=25630 View this thread: http://www.excelforum.com/showthread...hreadid=390428 |
#4
|
|||
|
|||
On Tue, 26 Jul 2005 20:59:13 -0500, Rhall wrote:
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 like this. 123 Main Street Anywhere usa 49000 Solution 1: Select the column, Edit -- Replace, put a space in the top field and replace all (replaces the spaces with nothing). This will cause a problem if you have a two-word city, such as Boca Raton. Solution 2: Suppose your city is in column C with a header row. Insert a column after and put this in D2: =TRIM(C2) This will trim the white space from the end of the city name. Drag the forumla down, select column D, press Edit -- Copy, Edit -- Paste Special, select Value, click OK. Problem resolved. MP- -- "Learning is a behavior that results from consequences." B.F. Skinner |
#5
|
|||
|
|||
If your required data is in column G, then you would need to use a new column (perhaps insert a new column H and push the other columns over), then in H1 put =trim(G1) and click on cell H1 and drag the small plus sign in the bottom right corner of the highlight down the column for as many rows as you have data in the G column. This would then give a 'trimmed' column H for you to use. -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059 View this thread: http://www.excelforum.com/showthread...hreadid=390428 |
#6
|
|||
|
|||
Got it :) I had to highlight the whole column and copy it opened a new workbook and pasted it in hit ctrl F to the find hit the space bar three times and clicked into the replace with and hit the ok button. Then I put the data back into the original workbook and did the mail merge again. So I guess it was that the field had extra spaces when the data was created. Thanks to all that sent me a reply and I look forward to learning more on this site. You guys are awesome! Ramona -- Rhall ------------------------------------------------------------------------ Rhall's Profile: http://www.excelforum.com/member.php...o&userid=25630 View this thread: http://www.excelforum.com/showthread...hreadid=390428 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I compare 2 sets of data and highlight differences? | Excel Worksheet Functions | |||
How do I import formmail data to a custom excel template? | Excel Worksheet Functions | |||
Data Source Name Not Found | Excel Worksheet Functions | |||
Line Graph Data Recognition | Charts and Charting in Excel | |||
Fetching External Data from Excel | Excel Discussion (Misc queries) |