TRIM function #2

Is it possible to trim an entire worksheet?
0
6/12/2007 8:00:00 AM
excel.newusers 15348 articles. 0 followers. Follow

2 Replies
599 Views

Similar Articles

[PageSpeed] 54

You could use a macro

Sub trimall()
Application.ScreenUpdating = False
    Dim myRange As Range
    Set myRange = Range("A1:D1000") '< Change to suit
        For Each c In myRange
            c.Select
            c.Value = Trim(c.Value)
        Next c
Application.ScreenUpdating = True
End Sub

Mike

"fitou_learn" wrote:

> Is it possible to trim an entire worksheet?
0
MikeH (222)
6/12/2007 8:46:00 AM
Many thanks Mike.  It worked a treat!

"Mike H" wrote:

> You could use a macro
> 
> Sub trimall()
> Application.ScreenUpdating = False
>     Dim myRange As Range
>     Set myRange = Range("A1:D1000") '< Change to suit
>         For Each c In myRange
>             c.Select
>             c.Value = Trim(c.Value)
>         Next c
> Application.ScreenUpdating = True
> End Sub
> 
> Mike
> 
> "fitou_learn" wrote:
> 
> > Is it possible to trim an entire worksheet?
0
6/12/2007 10:06:00 AM
Reply:

Similar Artilces:

Format Number #2
I have numbers that import into Excel and they come in with the General format. Example: 34350 The number is actually the amount of a check for $343.50 I need to be able to format the cells to show this format. I have been trying to create a custom currency format and have had no luck. Can anyone help? Just format an empty, unused cell to the currency format that you wish to use. Enter 100 into this cell. Right click in this cell and choose "Copy". Now, select the imported data. Right click in this selection and choose "PasteSpecial". Click on "Divide", the...

private items in calendar #2
Reposting: I have a user that is delegated access to another users calendar with the option to be able to see private items. Even with this option checked on the user still can't see the private items. We're using Exchange 2007/Outlook 2007. Any ideas how to troubleshoot/fix this issue? Thanks. -- ...

What Function to use
Hi I am quite a novice with MSExcel but have managed to achieve some success with formulas and formatting even between worksheets. However I am struggling with the following problem and would appreciate some advice. I have two columns, each of thirty cells, Column J will contain either the letter C or the letter P and column K will contain an amount. I want cell D37 to contain the total of only the cells in column K where the corresponding cells in column J equals "P" and likewise I want cell D38 to contain the total of only the cells in column K where the corresponding cell...

mailing lists #2
If the powers that be wish to send a 5mb attachment to 15,000 addresses, what are my difficulties in accomplishing this. I've been told by numerous list server software companies that it is not feasible, and the standard is a 50-100kb attachment. We will be moving to Exchange, and I was wondering if it's feasible? ...

EFT Payables #2
Is there a way to deactivate all EFT's in payable with one action? We need to create all checks instead of EFT's for one week. We have this option in payroll but we don't see it in payables. Thanks ...

Counting question #2
I have a range of cells that I want to 'count' if the number is greater than 0 but less than 6. The cell # is F33 where I want the answer. The range is: Q13:W13; Q17:W17; Q21:W17; Q25:W25; & Q29:W29. What formula would I use? I've tried several but I keep getting error answers. hi, =count(Q13:W13,Q17:W17,Q21:W17,Q25:W25,Q29:W29) >-----Original Message----- >I have a range of cells that I want to 'count' if the number is greater than >0 but less than 6. The cell # is F33 where I want the answer. The range is: >Q13:W13; Q17:W17; Q21:W17; Q25:W25...

microsoft publisher 97 #2
I have used publisher since I got my original computer....now with a new computer I was looking at getting the latest publisher installed.......I loved the old one and used it for every office need I had. but I am a little nervous about installing the new version......... 1. does it operate the same way....the same look and prompts, etc. 2. I tried microsoft word and just couldn't get the hang of it........ it is not as user friendly (to me) as publisher....... 3. what are the differences in old and new publisher versions........ thanks, Lward If you use endnotes and page notes - stay...

Audio Trim
Greetings from Downunder In PPT 2010 we have (at long last) the ability to trim, fade in and fade out audio tracks. I have a track that needs the first 7 secs to be removed and I can overcome this by advancing the green slider to the right. But that 7 secs of audio is still there, just not being played. My question is -- can that 7 secs be REMOVED from the audio timeline permamently. All help always appreciated. /carl In article <es7nH7bjKHA.1824@TK2MSFTNGP04.phx.gbl>, Carl wrote: > Greetings from Downunder > In PPT 2010 we have (at long last) the ability to tri...

External Data Range Properties #2
I am using Excel 97 to get data from a Access 97 DB. When I set the "Data layout" selection box of the External Data Range Properties dialogue box to "Overwrite existing cells with new data, clear unused cells" my data range works just fine. The problem come when I save/close the worksheet and then re-open. The "Data Layout" selection box defaults to "Insert entire rows for new data, clear unused cells" and subsequence data re-fresh causes a shift in the cells below the data I am importing. Is there an option or some way I can ensure that the ...

outlookexpress #2
Is there any way to add a search/address bar in your express mailbox instead of tuneling back and forth from explorer to outlook "glenda@strategiccasemgt" <anonymous@discussions.microsoft.com> wrote in message news:02b501c3aa11$a57d3cc0$a101280a@phx.gbl... > Is there any way to add a search/address bar in your > express mailbox instead of tuneling back and forth from > explorer to outlook this newsgroup is for support of Outlook 97/98/2000/2002/2003(beta) from the Office suite of products. Outlook Express is actually a separate program despite the similar name. Fo...

Problem with Macro #2
Hi I have a query on a macro I am trying to write and cannot figure ou where it is going wrong. What I am trying to do is to build a mode whereby I copy and paste a list of words, and then using the macr automatically create variations on these words in a separate column placing brackets or punctuation marks around the words in the list. Th idea is that I can use a different list of words each time, and th macro converts the entries in the cells to this format to create a extended list of words. For example: Word in list is : dog The macro copies this word, selects paste special, value, to...

GREX P6/15-2.5 23 Gauge 5/8-Inch Length Headless Pins (2,500 per box)
Price:$7.00 Image: http:///image.php?id=B000KM30W8 Best deal: http:///index.php?id=B000KM30W8 An amazing pinner that I thought would never secure that well and especially shoot through hard woods like it did. My brother used this one time and is hooked on it. It will be in his tool box also I have the GREX 635 pin nailer so I bought these pins for use in it. I have used these pins for many different jobs. I have used it to attach wooden cut-outs to my picket fence as well as for installing crown molding throughout my house. I never once experienced even a single pin jam, missfire, failu...

Mode Function Using Text
I can use mode with numbers no problem. I need help with text. I have one column with approximately 1000 entries of company names. I would like to see which company's name is listed the most in that column, which company is the second most and so on. How do I write a formula to return this information without assigning numbers to each different company name I found some info on this site already, but the suggestions did not work. This works -- ctrl/shift/enter =INDEX($A$1:$A$1000,SMALL(IF(ROW($1:$1000)*(MATCH($A$1:$A$1000,$A$1:$A$1000, 0)=ROW($1:$1000))=0,"",ROW($1:$1000)*(...

Outlook Calendar Permissions #2
I seem to have reset my permission levels (accidentally) and have denied myself access to setting up calendars on the public folders section of our networked system. Instead of having access to all tabs through Properties, including the Permissions tab, I can now only access the General and Home Page tabs. I have no idea how to correct this error and I'm becoming very frustrated. Can anyone offer a solution. Hi - post this in microsoft.public.exchange.admin for best results as it isn't an Outlook issue - and mention your version of Exchange there, as methods vary. M Wilson w...

Can I retain functions from a previous cell when inserting a new r
I have an Excel spreadsheet. I need to insert a row, but have a column with SUM functions going down each row. Can I insert the row and have the SUM function automatically entered in the new row created? Hi see: http://www.mvps.org/dmcritchie/excel/insrtrow.htm -- Regards Frank Kabel Frankfurt, Germany "Philobr" <Philobr@discussions.microsoft.com> schrieb im Newsbeitrag news:B5E5E5B1-C5EA-446A-A43F-017BB67F6773@microsoft.com... > I have an Excel spreadsheet. > I need to insert a row, but have a column with SUM functions going down each > row. > Can I insert the ...

Trim function #2
How can I have displayed the figures (cells) used, when I run a Trim function. Hi not really sure what you're rying to achieve. Could you give an example? >-----Original Message----- >How can I have displayed the figures (cells) used, when I run a Trim function. >. > When you use the TRIM Worksheet Function by itself the result is displayed in the cell. =TRIM(B1) If you want to know what B1 actually contains, you could use CODE for each byte, but easier would be Chip Pearson's Cell View -- http://www.cpearson.com/excel/CellView.htm For a maco to trim all cells i...

2 x Exchange servers & Terminal Services over VPN
We have 2 offices (UK & AUS) that are connected via firewall-to-firewall VPN. Each office has an Exchange server (UK=2000, AUS=2003) and a trust relationship has been established between the two offices. The UK users only have mailboxes on the UK Exchange server and vica-versa. AUS users connect to the UK's Terminal Services server over the VPN. When they send an e-mail via Outlook in their TS session, it can take up to a minute for the e-mail to be sent -- presumably, the delay in the instance of Outlook taking it's time to talk to the AUS Exchange server -- and we'd li...

COUNTIF Function #2
Hi, This is URGENT. Problem: In MS Excel, Column A contains values from A to Z and Column B contains value from 1 to 5. Now, I need to count the records that have "A" has value in Column A and "3" in Column B. I had tried with COUNTIF function but it works only for one criteria, i.e. it can be used if I want to count the records with value "A" in Column A or the records with "5 in Column B. Is there any function that can be used for this purpose. Pls treat this very urgent. ------------------------------------------------ ~~ Message posted from http://www...

Linking formula #2
I have two sheets, and I want to link information from one to the other. The difficulty is that on sheet 1, the data is entered in every consecutive cell down a column, but on sheet 2, I want that data linked to every third cell down the column. So, it goes like this: A1 on sheet 1 - A1 on sheet 2 A2 on sheet 1 - A4 on sheet 2 A3 on sheet 1 - A7 on sheet 2 and so on. Can somebody help? Jonathan -- Jonibenj ------------------------------------------------------------------------ Jonibenj's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=17048 View...

Service Pack #2
Is there any SP for GP8.0? According to our reseller SP is not release yet. Are there any way we can download the sp outside mbs web site? Thank you, Dave Yes there is. SP1a was released a few days ago. You should be able to log in to customersource and download it. HS "b0rne0" <b0rne0b0rne0@gmail.com> wrote in message news:O3k9qDb1EHA.1296@TK2MSFTNGP10.phx.gbl... > Is there any SP for GP8.0? According to our reseller SP is not release yet. > Are there any way we can download the sp outside mbs web site? > > Thank you, > Dave > > We cannot access ...

Put Active Worksheet's Name in a Cell #2
Is there a way to put the active worksheet's name in the cell? Not the file name of the whole workbook, just the name of the currently selected sheet. Thanks for your help. Making the cell respond to changes in selection would require an event macro. If you just want to put the sheet name in a cell, then : Function funny() As String funny = Range("A1").Worksheet.Name End Function will put the name of the sheet in a cell in that sheet. -- Gary's Student "coreymartin@gmail.com" wrote: > Is there a way to put the active worksheet's name in the cell? ...

Iff Function
The following is one of the fields in a query. Expr3: IFF(DateDiff("d",[Fld39],[Fld40])>=14,([Fld38] & " X" & " 12"),([Fld38] & " X" & " 6")) [Fld39] and [Fld40] are datefields in the table "SCHD" [Fld38] is a text field I need to modify the string in that text field as above depending on the DateDiff. When I run the query an error message "Undefined Function in Expression" appears. What am I doing wrong? Thanking you in advance Leo Try IIF ---- -- Build a little, test a lit...

VLOOKUP PROBLEM #2
I have a VLOOKUP formula in Excel 2000 that is doing what I want it to do, but I don't know that it's going to work correctly for the whole project. The short of what i am trying to do is i have a sheet that has 2 columns. the first is a vendor ID and the second is a percentage that we take off of retail price from that vendor. Basically what i would like to do is on another worksheet, be able to enter a vendor ID that will then lookup their discount percentage and display it in the cell next to it. i then do various calculations from there. this works perfectly if i only enter one ven...

Index and Match Function in VB
A few days ago, I did receive very good help from Max and Dave to achieve the following formula, =IF(B5="Synth",INDEX(AUTOS!$K$10:$K$500,MATCH(1,(Autos!$F$10:$F$500='ID'!D5)*(Autos!$G$10:$G$400='ID'!$R$2)*(AUTOS!$I$10:$I$400="C"),0))-INDEX(AUTOS!$K$10:$K$500,MATCH(1,(AUTOS!$F$10:$F$500='ID'!D5)*(AUTOS!$G$10:$G$400='ID'!$R$2)*(AUTOS!$I$10:$I$400="P"),0))+$R$2-$R$5,VLOOKUP(D5,$P$4:$R$8,3)-$R$5) Basically I was looking to retrieve data based on multiple criteria and the formula is working just fine. I now want to also be able to def...

Help Needed Urgently!! #2
that works great thank you very muc -- Zapp Branniga ----------------------------------------------------------------------- Zapp Brannigan's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1549 View this thread: http://www.excelforum.com/showthread.php?threadid=27073 ...