[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need to remove extra white space from description field.

Posted on 2012-03-28
6
Medium Priority
?
339 Views
Last Modified: 2012-03-28
I have a description column which contains data like this :



"This unit uses the firemaster top, which prevents any accidental discharges.

The canister dimensions are 8 and seven-eight inches by 2 inches. An optional holster can be purchased.


 Utilizes the Firemaster Safety Top to prevent accidental discharge
 Contains 17% Oleoresin Capsicum which gives 2 million Scoville Heat Units
 Has a 3 year shelf life
 Can supply up to 150 one-second bursts
 Total range of stream is 25-30 feet
 Made in USA



Product : SW20"





The problem is I have to save this file as a "Tab Delimited" text file.

All the text in the description needs to be on "one line".

Is there anyway to remove all the extra white space in the description?  
thanks
0
Comment
Question by:MikeMCSD
  • 3
  • 2
6 Comments
 
LVL 8

Accepted Solution

by:
Leo Torres earned 1000 total points
ID: 37776948
try
something like

=trim(A1)

where A1 is the field you need trimmed
0
 
LVL 8

Expert Comment

by:Leo Torres
ID: 37776988
if you have carriage return on a line this should be help full as well

http://www.justanswer.com/computer-programming/27rt7-replace-carriage-return-excel-needs.html
0
 
LVL 12

Assisted Solution

by:kgerb
kgerb earned 1000 total points
ID: 37777098
1.  Select the cell(s) you wish to modify and press Ctrl+F (Find).
2.  In the Find what box enter Alt+0010.  This is the ASCII code for carriage return.  Nothing will visibly change but continue anyway.
3.  In the Replace with box enter two spaces, or a comma, or whatever you wish to replace the carriage returns.
4.  Click replace all and you should be finished!

Kyle

Correction:
Alt+0010 is Line Feed, Alt+0013 is Carriage Return.  You may need to run find and replace twice, one for each.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 16

Author Comment

by:MikeMCSD
ID: 37777317
thanks guys . . .

The Replace couldn't find those codes so I tried :

=SUBSTITUTE(C2, CHAR(13), " ") 'carriage returns

=SUBSTITUTE(C2, CHAR(10), " ")  'line feeds'

and they both worked the same.
Should I run both of them?
0
 
LVL 8

Expert Comment

by:Leo Torres
ID: 37777327
yes run then both
they are replacing different things.. and you want to get the shortest string possible correct..
0
 
LVL 16

Author Closing Comment

by:MikeMCSD
ID: 37777913
worked . . thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question