macro to eliminate spaces between words

i've a book full of references made wrong , for example the correct refernce 
is FFF and in my book i've F F F. It's possible with a macro eliminate this 
spaces?
Help me please. My book has 10 pages all wrong:(

Thanks
0
CSAM (2)
12/16/2004 4:57:01 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
384 Views

Similar Articles

[PageSpeed] 48

Hi
why not use 'Edit - Replace' for this?

-- 
Regards
Frank Kabel
Frankfurt, Germany
"CSAM" <CSAM@discussions.microsoft.com> schrieb im Newsbeitrag 
news:C3D850FF-664F-4B1D-BD87-D90CBB1CBDE1@microsoft.com...
> i've a book full of references made wrong , for example the correct 
> refernce
> is FFF and in my book i've F F F. It's possible with a macro eliminate 
> this
> spaces?
> Help me please. My book has 10 pages all wrong:(
>
> Thanks 


0
frank.kabel (11126)
12/16/2004 5:00:56 PM
Csam

Public Sub Strip_WhiteSpace()
    Selection.Replace What:=" ", _
            Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False
End Sub

Note: will remove ALL whitespace before, between and after.

Gord Dibben Excel MVP


On Thu, 16 Dec 2004 08:57:01 -0800, "CSAM" <CSAM@discussions.microsoft.com>
wrote:

>i've a book full of references made wrong , for example the correct refernce 
>is FFF and in my book i've F F F. It's possible with a macro eliminate this 
>spaces?
>Help me please. My book has 10 pages all wrong:(
>
>Thanks

0
Gord
12/16/2004 10:32:08 PM
Thanks. I'll try this way.

"Gord Dibben" wrote:

> Csam
> 
> Public Sub Strip_WhiteSpace()
>     Selection.Replace What:=" ", _
>             Replacement:="", LookAt:=xlPart, _
>             SearchOrder:=xlByRows, MatchCase:=False
> End Sub
> 
> Note: will remove ALL whitespace before, between and after.
> 
> Gord Dibben Excel MVP
> 
> 
> On Thu, 16 Dec 2004 08:57:01 -0800, "CSAM" <CSAM@discussions.microsoft.com>
> wrote:
> 
> >i've a book full of references made wrong , for example the correct refernce 
> >is FFF and in my book i've F F F. It's possible with a macro eliminate this 
> >spaces?
> >Help me please. My book has 10 pages all wrong:(
> >
> >Thanks
> 
> 
0
CSAM (2)
12/17/2004 11:39:05 AM
Reply:

Similar Artilces:

Does Word have a command that compares to WordPerfect Advance?
I want to advance text to a specific position within the line that is independent of the number of characters that precedes it. Tab will not work as it measures from the preceding character. WordPerfect has a command: "Typesetting" "Advance" that I use for this. Is there a comparable command in MS Word? Word does have an Advance field, mostly for compatibility with documents imported from WordPerfect. If you use the \x switch, it will position the next character at the specified location. According to the help topic on the Advance field, the \x switch &qu...

reserved words
why can reserved words be used in a table in excel and not in acess? am using 2007, tested importing a csv file from paypal to acess and protested at the field names. fianlly can anyone recommend tutorials on youtube as comprehensive as excel is fun? thanks for the trouble. ged. On Thu, 26 Nov 2009 15:00:01 -0800, stressed windows user <stressedwindowsuser@discussions.microsoft.com> wrote: >why can reserved words be used in a table in excel and not in acess? am using >2007, tested importing a csv file from paypal to acess and protested at the >field names. fi...

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

get rid of macro option at startup
I created and then deleted a macro in an Excel file. Why do I still get the warning box (i.e. the one asking if I want to enable or disable macros) when I open the file? Is there a way to get rid of this since I no longer have macros in this file? Thanks. Brad You need to delete the empty module.! Bill K "Brad Rench" <brench@comcast.net> wrote in message news:kSOdnb0Jjst9afaiXTWJkg@comcast.com... > I created and then deleted a macro in an Excel file. > > Why do I still get the warning box (i.e. the one asking if I want to enable > or disable macros) when I o...

Word 2007: word count wrong?
Hello, I have an issue with some .doc files when opening in Word 2007. In some cases the word count in the status bar is different of the word count of the "Word Count"- window (CTRL+SHIFT+G) or the word count in Word 2003 Example file: http://go.microsoft.com/fwlink/?LinkId=79595 Word 2007 (status bar) show 61019 words Word 2007 (Word count window) show 61010 words Word 2003 also show 61010 words This issue I have not with all documents, but only with some files and it seems that I have this problem only with .doc files but not with .docx files. (installed ve...

Solver add-in and macros
I just got a new computer with XP and Excel 2003 and tried to run a macro that used to SOLVER add-in function and got a compile error. As a test I recorded a macro using the SOLVER and got the same result when I tried to run that macro. The Compile Error is "Sub or Function not defined". On the Knowledge Base it says I need to add SOLVER to the list of References in the VB Editor. When I go to the references list, SOLVER does not appear. When I open Help for VB and search for SOLVER, it finds nothing. What is going on? Why doesn't VB even recognize the existence ...

Somehow I created a Macro in a worksheet.
I created a macro in an Excel worksheet somehow. I didn't try to, it just happened. Now everytime I open that workbook, it asks me if I want to run the macro, disable it, etc. How the hell do I get rid of the macro? It doesn't show up under tools, macros. And it apparently doesn't do anything either because I can disable it and nothing different happens. Who invented this system anyway? Thanks, V When you record a macro, a module is created to store the macro code. There are instructions here for removing the module that is causing the prompt to appear: http://www.c...

Macro's with Ctrl or Ctrl-Shift?
When you record a new macro it asks you what Ctrl key you want to access it with. If you Edit the Properties of a Macro it asks you what Ctrl-Shift key you want to use to access a macro. How can you have more control over this to assign the proper key to a macro? Thanks. Al, I don't know what you mean by "edit the properties of a macro." You can assign a Ctrl or Ctrl-Shift combination (excluding number keys) to macros either when about to record a macro, or later with Tools - Macro - Macros - Options. If by "have more control," you mean keys other than C...

XL 2007: How to find out what keyboard shortcuts I've assigned to macros?
Over the years, I've recorded and written a lot of macros. (Probably time to take a week or two and go over them and delete at least half!) I assigned a keyboard shortcut to a lot of them. I seem to remember that before XL 2007, there was a keyboard organizer that I could go through and review what shortcuts I had already assigned to my macros. I can't find that in 2007, though. Is there an easy way to generate a list of all my keyboard assignments and what macros they go to? Ed I don't recall ever seeing any such keyboard organizer in 2007. Canned from a prev...

Convert Double Space To Single Space
How do you convert double spaced text to single spaced? I don't see an option for this in Outlook. I can paste into Notepad, copy and then paste into Outlook, but I would prefer a way to do it within Outlook. ...

how to automatically suppress space before after column break?
Having Spacing Before and After on some of the styles, I seem to be unable to have the space before at the beginning of a column automatically dismissed when applying a column break. I have tried a couple of options under compatibility, but to no avail. This in on Word 2003. The No HTML function + No Space Before after column break do not solve the problem. Can you help please? Tools | Options | Compatibility: Suppress Space Before after a hard page or column break. If this isn't working, then check to make sure you don't have an empty paragraph before the first text pa...

After 12.2.4 update, cannot open some Word docs with Open passwords
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel After installing the 12.2.4 Office update, I am unable to open some Word files that I had password-protected with an Open File password. How can I open? Thanks Basically, "you can't". Sorry, the other passwords are crackable, but "Password to Open" is effectively the encryption key. The entire file is encrypted, and unless you have the correct password, you can't get it open. However, are you sure you are not attempting to open files that were password-=protected on the PC? ...

Word 2008 keeps crashing
I recently purchased a Macbook Pro and installed Office 2008. Whenever I type in Word or copy/paste from another document, I either get an error that says "Insufficient memory" or the application freezes and will not respond. Is there something I can do or just have to wait for an update? > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3285228210_9363962 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 2/7/08 10:37 AM, in article ee8c846.-1@web...

[ANN] "Bend Word to your Will" -- April 2005 edition free download
Dear all, THIS ANNOUNCEMENT IS ABOUT A *NON-COMMERCIAL* RESOURCE BASED IN PART ON ACCUMULATED ADVICE FROM THIS NEWSGROUP The latest version of my notes on Word -- titled "Bend Word to Your Will" -- is now available for downloading from the Word MVPs' site, http://www.mvps.org/word/FAQs/WordMac/Bend/BendWord.htm WHAT IS "BEND WORD TO YOUR WILL"? "Bend Word to Your Will" is not a commercial product for sale -- it's free. It's a dictionary-style (mainly) set of notes on Word that I've been continually adding to and polishing for the past four year...

Pivot tables and Macros
I was looking to be able to manipulate (ie change selections from the drop downs, not change the fields in the table or anything)and print from a pivot table using a macro. So how do I go about doing that? When I set up a macro by recording the actions that I want to do, I always get an error message when I try to run it as a macro. What specific steps are you recording, and what error message do you get? Can you click the Debug button, and see the line of code that is causing the problem? Dust For Eyes wrote: > I was looking to be able to manipulate (ie change selections from the >...

Can I have spell check ignore errors and alert me to real words?
Instead of stopping on misspellings and skipping real words, is there a way to stop on correct spellings to find actual words in a bunch of gibberish? Sort of an "UNspell check". For example, pass over "JJKSXO" but show me "SPELL". No, there is no way of doing that regards, Peo Sjoblom "JenLynFish" wrote: > Instead of stopping on misspellings and skipping real words, is there a way > to stop on correct spellings to find actual words in a bunch of gibberish? > Sort of an "UNspell check". For example, pass over "JJKSX...

Word 2007 Error message
Hello, I'm currently using Works Suite 2006. I am attempting to intall the Word 2007 upgrade to no avail as I receiving the following error message: SET-UP ERROR D:\wordR.ww\osetup.DLL digital signature does not validate or is not present I would appreciate any advice and/or suggestions so that I can install Word 2007. Ciao, Jerry Sorry Jerry but this is Microsoft Access forum. You need to post this question to a different group to find any useful help. "Jerry T" <Jerry T@discussions.microsoft.com> wrote in message news:B45E64C3-D080-405E-9159-CB3E7F73AFFC@micr...

Help-- Having trouble opening Word & Entourage
I have to keep restarting my computer to be able to open Word or Entourage. The icons just bounce a little but won't open. I was getting a request from Entourage to rebuild the database which I did about 6 or 7 times. I got another warning which I ignored. I am on a MacBook Pro (Intel based). I am using office 2004. My Entourage database is 3.2 gb. I ran Disk Utilities a couple of times. I also had a problem a couple of times with FileMaker Pro but not sure if related. Thanks Christina On 22/8/06 20:01, in article 1156273266.788654.318170@i42g2000cwa.googlegroups.com, "...

get rid of extra spaces between paragraphs worked only once.
Changed style from Word 7 to Word 3, used help online, but still have 2 left with spaces I cannot get rid of on my last page. Got any help for me? -- Only fools and bigots prefer French over Spanish to be taught in public or private schools. In the Styles pane (Ctrl+Alt+Shift+S), right-click the style name and choose Modify from the context menu. In the Modify Style dialog box, click Format, Paragraph. Make sure that Line Spacing is what you want, and that Spacing Before and Spacing After are both set to zero. Click OK. To transfer the style definition to the attached template, d...

How do I create custom postcards in Word 2007?
I want to create my own postcards using the right size and type of paper for mailing. This depends entirely on your printer. Can it handle the heavy weight of card used in postcards, and can it handle the unusual size of a postcard? On Apr 18, 2:54=A0pm, Create Custom Postcards <Create Custom Postca...@discussions.microsoft.com> wrote: > I want to create my own postcards using the right size and type of paper = for > mailing. Perhaps the easiest way to start is to get some Avery (or similar) postcard stock, which will have two postcards per sheet. Then find the a...

Create Excel macro for barcode output
I am looking for suggestions or samples of an Excel macro that will output barcodes that can be printed and then attached onto loan documents. Example: input loan # 555 and print off 20 barcoded labels - each label contains loan number + the document type. hi, you don't need a macro for that. we just got throught barcodeing our part numbers in the ware house and used excel and no macro. bar codes are just another font. excel uses 3 0f 9 barcode font. you can download others off the net. you can format a cell with this font and it will show as barcode on the sheet and numbers in th...

"Enabel / Disable macros" message box appears no matter which .xls file the user opens....
"Enabel / Disable macros" message box appears no matter which .xls file I open... I can't find any hidden/empty code in the xls files... Has someone got any experience with this? krgds, Nils Egil Lie Stolt Offshore AS Hi you also have to remove the (empty) modules in the VBA editor. Also check that there're no statements left in the worksheet modules and in the workbook module -- Regards Frank Kabel Frankfurt, Germany Nils Egil Lie wrote: > "Enabel / Disable macros" message box appears no matter which .xls > file I open... I can't find any hidden/emp...

Macros #48
If I record a Macro that performs a number of functions on a particular set of data, can I then run the Macro on a different set of data without the tesium of going into the VB editor and changing it manually?? I have tried preselecting the new data set and running the macro, but it reverts back to the original set in the VB code. Any suggestions appreciated. Check the generated VBA code. Whatever actions are recorded will be executed when you run it again. Even if you pre-select the second time, say A1:B10, whereas in your generated VBA, you have something like selection.Action then it...

Counting number of words in a sentence and highlighting or commenting
Hi, I found some old code, from Helmut of Bavaria I believe, that is supposed to find long sentences in a document: Sub test002() Dim rDcm As Range ' the documents main story range Dim oWrd As Object ' a word Dim oSnt As Object ' a sentence Dim oPrg As Paragraph ' a paragraph Dim lWrd As Long ' a counter for words Dim lSnt As Long ' a counter for sentences Dim lPrg As Long ' a counter for paragraphs Set rDcm = ActiveDocument.Range For Each oPrg In rDcm.Paragraphs lPrg = lPrg + 1 lSnt = 0 For Each oSnt I...

number of lines on a word document
Operating System: Mac OS X 10.5 (Leopard) I want to produce a long, double-spaced document with the same number of lines on each page, not one that flips to a new page if the end paragraph is too large to fit. Can anyone help? Maintaining a constant number of lines per page is dependent on at least 2 factors: 1- Using the same font & font size throughout, & 2- Turning off Widow/Orphan control in Format> Paragraph - Line & Page Breaks. Due to the proportional spacing considerations of modern word processing -- which is more closely akin to typesetting than typewr...