Check for # of Words in Function

Apologies in advance, I am NOT a coder, I am trying to fix VBA someone wrote 
for me by 'slogging' through it on my own. Making some decent headway on 
easier stuff but I am at an impasse. 

He has a function that creates an Acronym out of a Value.  However I want to 
modify it so it ONLY does it if the # of words in that value >  1. Can anyone 
give me a heads up on how to add that here please? It would be most 
appreciated:

Private Function GenerateAcronym(ByVal val As String) As String   'Tested OK
    Dim str As String, prom As String, ch As String, res As String
    Dim pos As Long
        
    res = ""
    str = Trim(val)
    
    If Len(str) > 0 Then
        While InStr(str, " ") > 1
            prom = Trim(Left(str, InStr(str, " ") - 1))
            
            If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And 
Not (UCase(prom) = "THE") And _
                Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
            
                ch = Left(prom, 1)
                If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
Asc(ch) <= 122) Then
                    res = res + Left(prom, 1)
                End If
            End If
            
            str = Trim(Right(str, Len(str) - InStr(str, " ")))
            'res = res + Left(str, 1)
        Wend
        
        prom = str
        If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not 
(UCase(prom) = "THE") And _
            Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
        
            ch = Left(prom, 1)
            If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
Asc(ch) <= 122) Then
                res = res + Left(prom, 1)
            End If
        End If
    End If
    
    GenerateAcronym = UCase(res)
    
End Function
0
Utf
2/13/2010 11:18:01 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

4 Replies
698 Views

Similar Articles

[PageSpeed] 14

First, this needs xl2k or higher since it uses VBA's Split command.  But if you
need to support xl97 and before, there's some code you can add that will make it
work.

Second, sometimes making the string uppercase to start will make the code easier
to write/update.  You won't have to check for each comparison.

Third, instead of having lots of comparisons in an If/and/or, using Select Case
can be easier to write/update.

Option Explicit
Private Function GenerateAcronym2(ByVal val As String) As String
    Dim myStr As String
    Dim wCtr As Long
    Dim mySplit As Variant
    Dim myAcronym As String
    Dim LeadChar As String
    
    'remove all the extra spaces and make it upper case
    myStr = UCase(Application.Trim(val))
    
    If Len(myStr) = 0 Then
        myAcronym = ""
    Else
        mySplit = Split(myStr, " ")
        If UBound(mySplit) - LBound(mySplit) = 0 Then
            'only one word
            myAcronym = val 'whatever was passed or myStr????
        Else
            myAcronym = ""
            For wCtr = LBound(mySplit) To UBound(mySplit)
                Select Case mySplit(wCtr)
                    Case Is = "OF", "FOR", "THE", "AND", "A"
                        'skip it
                    Case Else
                        'Check to make sure it's A to Z
                        LeadChar = Left(mySplit(wCtr), 1)
                        If Asc(LeadChar) >= Asc("A") _
                         And Asc(LeadChar) <= Asc("Z") Then
                            myAcronym = myAcronym & LeadChar
                        End If
                End Select
            Next wCtr
        End If
    End If
    
    GenerateAcronym2 = myAcronym

End Function

msnyc07 wrote:
> 
> Apologies in advance, I am NOT a coder, I am trying to fix VBA someone wrote
> for me by 'slogging' through it on my own. Making some decent headway on
> easier stuff but I am at an impasse.
> 
> He has a function that creates an Acronym out of a Value.  However I want to
> modify it so it ONLY does it if the # of words in that value >  1. Can anyone
> give me a heads up on how to add that here please? It would be most
> appreciated:
> 
> Private Function GenerateAcronym(ByVal val As String) As String   'Tested OK
>     Dim str As String, prom As String, ch As String, res As String
>     Dim pos As Long
> 
>     res = ""
>     str = Trim(val)
> 
>     If Len(str) > 0 Then
>         While InStr(str, " ") > 1
>             prom = Trim(Left(str, InStr(str, " ") - 1))
> 
>             If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And
> Not (UCase(prom) = "THE") And _
>                 Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
> 
>                 ch = Left(prom, 1)
>                 If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And
> Asc(ch) <= 122) Then
>                     res = res + Left(prom, 1)
>                 End If
>             End If
> 
>             str = Trim(Right(str, Len(str) - InStr(str, " ")))
>             'res = res + Left(str, 1)
>         Wend
> 
>         prom = str
>         If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not
> (UCase(prom) = "THE") And _
>             Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
> 
>             ch = Left(prom, 1)
>             If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And
> Asc(ch) <= 122) Then
>                 res = res + Left(prom, 1)
>             End If
>         End If
>     End If
> 
>     GenerateAcronym = UCase(res)
> 
> End Function

-- 

Dave Peterson
0
Dave
2/14/2010 12:56:53 AM
Thanks. I'll take a look at that, as I said code is 'not my bag man' but 
thanks for the insight.

I did an easy fix at the end instead

 If Len(res) = 1 Then
    GenerateAcronym = str
    Else
    GenerateAcronym = UCase(res)
    End If

i.e. I just let it process and if the final Acronym Length was 1 just use 
the original string instead.

"Dave Peterson" wrote:

> First, this needs xl2k or higher since it uses VBA's Split command.  But if you
> need to support xl97 and before, there's some code you can add that will make it
> work.
> 
> Second, sometimes making the string uppercase to start will make the code easier
> to write/update.  You won't have to check for each comparison.
> 
> Third, instead of having lots of comparisons in an If/and/or, using Select Case
> can be easier to write/update.
> 
> Option Explicit
> Private Function GenerateAcronym2(ByVal val As String) As String
>     Dim myStr As String
>     Dim wCtr As Long
>     Dim mySplit As Variant
>     Dim myAcronym As String
>     Dim LeadChar As String
>     
>     'remove all the extra spaces and make it upper case
>     myStr = UCase(Application.Trim(val))
>     
>     If Len(myStr) = 0 Then
>         myAcronym = ""
>     Else
>         mySplit = Split(myStr, " ")
>         If UBound(mySplit) - LBound(mySplit) = 0 Then
>             'only one word
>             myAcronym = val 'whatever was passed or myStr????
>         Else
>             myAcronym = ""
>             For wCtr = LBound(mySplit) To UBound(mySplit)
>                 Select Case mySplit(wCtr)
>                     Case Is = "OF", "FOR", "THE", "AND", "A"
>                         'skip it
>                     Case Else
>                         'Check to make sure it's A to Z
>                         LeadChar = Left(mySplit(wCtr), 1)
>                         If Asc(LeadChar) >= Asc("A") _
>                          And Asc(LeadChar) <= Asc("Z") Then
>                             myAcronym = myAcronym & LeadChar
>                         End If
>                 End Select
>             Next wCtr
>         End If
>     End If
>     
>     GenerateAcronym2 = myAcronym
> 
> End Function
> 
> msnyc07 wrote:
> > 
> > Apologies in advance, I am NOT a coder, I am trying to fix VBA someone wrote
> > for me by 'slogging' through it on my own. Making some decent headway on
> > easier stuff but I am at an impasse.
> > 
> > He has a function that creates an Acronym out of a Value.  However I want to
> > modify it so it ONLY does it if the # of words in that value >  1. Can anyone
> > give me a heads up on how to add that here please? It would be most
> > appreciated:
> > 
> > Private Function GenerateAcronym(ByVal val As String) As String   'Tested OK
> >     Dim str As String, prom As String, ch As String, res As String
> >     Dim pos As Long
> > 
> >     res = ""
> >     str = Trim(val)
> > 
> >     If Len(str) > 0 Then
> >         While InStr(str, " ") > 1
> >             prom = Trim(Left(str, InStr(str, " ") - 1))
> > 
> >             If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And
> > Not (UCase(prom) = "THE") And _
> >                 Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
> > 
> >                 ch = Left(prom, 1)
> >                 If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And
> > Asc(ch) <= 122) Then
> >                     res = res + Left(prom, 1)
> >                 End If
> >             End If
> > 
> >             str = Trim(Right(str, Len(str) - InStr(str, " ")))
> >             'res = res + Left(str, 1)
> >         Wend
> > 
> >         prom = str
> >         If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not
> > (UCase(prom) = "THE") And _
> >             Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
> > 
> >             ch = Left(prom, 1)
> >             If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And
> > Asc(ch) <= 122) Then
> >                 res = res + Left(prom, 1)
> >             End If
> >         End If
> >     End If
> > 
> >     GenerateAcronym = UCase(res)
> > 
> > End Function
> 
> -- 
> 
> Dave Peterson
> .
> 
0
Utf
2/14/2010 2:03:01 AM
On Sat, 13 Feb 2010 15:18:01 -0800, msnyc07 <msnyc07@discussions.microsoft.com>
wrote:

>Apologies in advance, I am NOT a coder, I am trying to fix VBA someone wrote 
>for me by 'slogging' through it on my own. Making some decent headway on 
>easier stuff but I am at an impasse. 
>
>He has a function that creates an Acronym out of a Value.  However I want to 
>modify it so it ONLY does it if the # of words in that value >  1. Can anyone 
>give me a heads up on how to add that here please? It would be most 
>appreciated:
>
>Private Function GenerateAcronym(ByVal val As String) As String   'Tested OK
>    Dim str As String, prom As String, ch As String, res As String
>    Dim pos As Long
>        
>    res = ""
>    str = Trim(val)
>    
>    If Len(str) > 0 Then
>        While InStr(str, " ") > 1
>            prom = Trim(Left(str, InStr(str, " ") - 1))
>            
>            If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And 
>Not (UCase(prom) = "THE") And _
>                Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
>            
>                ch = Left(prom, 1)
>                If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
>Asc(ch) <= 122) Then
>                    res = res + Left(prom, 1)
>                End If
>            End If
>            
>            str = Trim(Right(str, Len(str) - InStr(str, " ")))
>            'res = res + Left(str, 1)
>        Wend
>        
>        prom = str
>        If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not 
>(UCase(prom) = "THE") And _
>            Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
>        
>            ch = Left(prom, 1)
>            If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
>Asc(ch) <= 122) Then
>                res = res + Left(prom, 1)
>            End If
>        End If
>    End If
>    
>    GenerateAcronym = UCase(res)
>    
>End Function

Here's a bit shorter function using Regular Expressions that should accomplish
the same thing.

If I understand the rules correctly, the Acronym is formed by returning the
capitalized first letter of every word that starts with a letter (A-Za-z),
unless that word is   OF, FOR, AND, A, THE

And the Acronym needs to be at least two letters long.

That being the case, try:

=====================================
Option Explicit
Private Function GenerateAcronym(ByVal s As String) As String
 Dim re As Object
 Dim sRes As String
 Const sPat As String = "\b(OF|FOR|THE|AND|A)\b|\s*\b(([A-Z])|\S)\w+\b\s*"

Set re = CreateObject("vbscript.regexp")
    re.Pattern = sPat
    re.Global = True
sRes = re.Replace(UCase(s), "$3")
    If Len(sRes) <= 1 Then sRes = ""
GenerateAcronym = sRes
End Function
====================================
--ron
0
Ron
2/14/2010 2:06:03 AM
On Sat, 13 Feb 2010 21:06:03 -0500, Ron Rosenfeld <ronrosenfeld@nospam.org>
wrote:

>On Sat, 13 Feb 2010 15:18:01 -0800, msnyc07 <msnyc07@discussions.microsoft.com>
>wrote:
>
>>Apologies in advance, I am NOT a coder, I am trying to fix VBA someone wrote 
>>for me by 'slogging' through it on my own. Making some decent headway on 
>>easier stuff but I am at an impasse. 
>>
>>He has a function that creates an Acronym out of a Value.  However I want to 
>>modify it so it ONLY does it if the # of words in that value >  1. Can anyone 
>>give me a heads up on how to add that here please? It would be most 
>>appreciated:
>>
>>Private Function GenerateAcronym(ByVal val As String) As String   'Tested OK
>>    Dim str As String, prom As String, ch As String, res As String
>>    Dim pos As Long
>>        
>>    res = ""
>>    str = Trim(val)
>>    
>>    If Len(str) > 0 Then
>>        While InStr(str, " ") > 1
>>            prom = Trim(Left(str, InStr(str, " ") - 1))
>>            
>>            If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And 
>>Not (UCase(prom) = "THE") And _
>>                Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
>>            
>>                ch = Left(prom, 1)
>>                If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
>>Asc(ch) <= 122) Then
>>                    res = res + Left(prom, 1)
>>                End If
>>            End If
>>            
>>            str = Trim(Right(str, Len(str) - InStr(str, " ")))
>>            'res = res + Left(str, 1)
>>        Wend
>>        
>>        prom = str
>>        If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not 
>>(UCase(prom) = "THE") And _
>>            Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") Then
>>        
>>            ch = Left(prom, 1)
>>            If (Asc(ch) >= 65 And Asc(ch) <= 90) Or (Asc(ch) >= 97 And 
>>Asc(ch) <= 122) Then
>>                res = res + Left(prom, 1)
>>            End If
>>        End If
>>    End If
>>    
>>    GenerateAcronym = UCase(res)
>>    
>>End Function
>
>Here's a bit shorter function using Regular Expressions that should accomplish
>the same thing.
>
>If I understand the rules correctly, the Acronym is formed by returning the
>capitalized first letter of every word that starts with a letter (A-Za-z),
>unless that word is   OF, FOR, AND, A, THE
>
>And the Acronym needs to be at least two letters long.
>
>That being the case, try:
>
>=====================================
>Option Explicit
>Private Function GenerateAcronym(ByVal s As String) As String
> Dim re As Object
> Dim sRes As String
> Const sPat As String = "\b(OF|FOR|THE|AND|A)\b|\s*\b(([A-Z])|\S)\w+\b\s*"
>
>Set re = CreateObject("vbscript.regexp")
>    re.Pattern = sPat
>    re.Global = True
>sRes = re.Replace(UCase(s), "$3")
>    If Len(sRes) <= 1 Then sRes = ""
>GenerateAcronym = sRes
>End Function
>====================================
>--ron

Looking at the "simple fix" you posted to Dave's suggestion, I might change
mine to read:

=========================
Option Explicit
Private Function GenerateAcronym(ByVal s As String) As String
 Dim re As Object
 Dim sRes As String
 Const sPat As String = "\b(OF|FOR|THE|AND|A)\b|\s*\b(([A-Z])|\S)\w+\b\s*"

Set re = CreateObject("vbscript.regexp")
    re.Pattern = sPat
    re.Global = True
sRes = re.Replace(UCase(s), "$3")
    If Len(sRes) = 1 Then sRes = s
GenerateAcronym <= sRes
End Function
==============================

This returns the original string if the acronym generated is one letter (or
zero letters)

But some questions to think about.

What would you want returned if the initial string is:

For  (an ignored word)
For Now  (two words, but generates a single letter acronym).

--ron
0
Ron
2/14/2010 2:16:35 AM
Reply:

Similar Artilces:

Importing five row list from word 2003 to excel
I have a Word five row list I would like to import into Excel in a five column list. Every hundred items or so their is a new heading. What do I do? If it is in a word table you can cut and paste it. But you will have to reformat it. Once you get it into excel you can sort it and delete the duplicate headers. --- Message posted from http://www.ExcelForum.com/ ...

Can you make a crossword puzzle by putting the words in?
I have to make a crossword puzzle for one of my classes, and was wondering if there is a program on my computer that will show me how to make the crossword puzzles. If you can help that would be great. Perhaps this MS link would be of interest: http://www.microsoft.com/education/Crossword.aspx "Design a Crossword Puzzle in Microsoft Excel" -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <at>yahoo<dot>com ---- "Kat" wrote: > I have to make a crossword puzzle for one of my classes, and was wondering if > there is ...

how do i type words in a circle
I am trying to type very bold (72 pt) in a circle any help??? From the left select Word Art. It is a red W with a blue A on the icon. -- Don - Publisher 2000� Vancouver, USA "nancy@sb" <nancy@sb@discussions.microsoft.com> wrote in message news:7AF648BB-EB1F-43FB-B0B4-4C8D69656586@microsoft.com... >I am trying to type very bold (72 pt) in a circle > any help??? Hey Don, the WordArt icon is a slanted blue W in 2003 & 07. It will be the same on the 2010 ribbon. I have a WordArt circle on my web page. Scroll way down. http://msauer.mvps....

What's the function of folder subscription in MS Outlook 2003
Hi, I would like my MS Outlook to show all imap folders in my account, but to run routine updating only on my inbox folder. I would like each of my folders to be updated only when I choose a folder. I checked my folder list and identified a distinction between "all" folders and "subscribed folders". For some reason, all my folders were already subscribed. I've unsubscribed from my folders, but the complete list keeps showing up. Is there anything wrong with my folder list routine, or is my logic erronous? Please suggest a solution? Ran ...

Three words to describe Money 2005...
Wasted screen space. Holy cow! This a TERRIBLE use of screen real estate. In register view, nearly 25% of the scren is filled up with the toolbars and *WHITE* space with no meaningful information! Whoever designed this interface, pretty though it is, lost sight of what's important: information. I'm terribly disappointed. I've never felt like Money had too much fluff... until now :( ...

Copying specific data from Word to Excel
What I need to do is 1) Extract the monetary amount (always after the 2nd asterisk (*) after the letters BPR. 2) Extract the number (always after the 2nd asterisk (*) after the letters TRN. 3) Place the numbers in the same row on an Excel spreadsheet. 4) Repeat to the end of the document. Sample data BPR*I*925.79*C*ACH*CCP*01*xxxxxxxxxxxx*DA*xxxxxxxxxxxxxxx*xxxxxxxxxxxxxxx**01*xxxxxxxxxxxx*DA*xxxxxxxxxxxxxxx*20091126~TRN*1*999999999*xxxxxxxxxxxx The file I need to extract from is always text. Is this better done from a Word macro or an Excel macro. Or can it be done at al...

MATCH function; comparing letter grades in columns
I am currently comparing the contents on two cells in columns H & I (for example, cells H10 and I10). The contents are letter grades (i.e., A, A-, B+, B, etc., through E). I have my function tell me if there is any difference between the two columns and report the result (i.e., =93no change,=94 rating decrease,=94 or =93rating increase=94) in th= e adjoining column, J10. I use the MATCH function, and since it can=92t distinguish between the letter grades, I have placed the letter grades in cells M2 through M13. My function is as follows: =3DIF(MATCH(H10,M$2:M$13,0)=3DMATCH(I10,M$2:M$1...

How can I save Visio as Word to allow an edit in Word?
I have several flow diagrams that my national director wants saved in Word format so she can "play" with them. No matter the format I choose to save the files, no matter the times I save with a different file extension, the page always opens in Visio. Is there any way to save the files to allow editing in Word? I really don't want to have to do these all over again. And no, she has no intention of learning how to use Visio. Thanks! unfortunately her desire to edit them in word will go unfulfilled. al "Mollyb" <Mollyb@discussions.microsoft.com> wro...

How to find the check form to use for GP 9.0
I don't want to use Deluxe as our check vendor. I want to use Harland. Microsoft MBS sales just gives us Deluxe's phone number, when we request help with obtaining the correct format for Harland checks. Harland has two check formats for GP payable checks. 1) Great Plains Accounting 7.0 - 9.0 2) Great Plains Dynamics Harland isn't sure and can't reference Deluxe. Thanks, John John, From what I can tell from Harland's website, you want the Laser Multi-Purpose checks they show under Microsoft Great Plains. That's the one with the check in the middle, stub on t...

In Word how to use Outlook, Excel
I am using Word 2007. How can I access Outlook contacts or Excel documents from Word -- Thank you in advance for your support and suggestions To access Outlook contacts, Outlook must be your default e-mail application in Windows. You can then use Insert Address (which you can add to the QAT (Quick Access Toolbar) . What is it that you want to access from Excel? If you need to look something up in Excel and enter it into a document, you will need a macro. You can however use edit paste special to insert Excel cells copied to the clipboard. -- <>>< ><<...

Linking and Updating Word Text
I created a template in Publisher, including text, titles, pictures, etc. I have 13 separate Word docs that people are changing and updating. The text from the 13 documents needs to link into that Publisher template, to creat 13 new Publisher files. I need to accomplish two goals: a) 13 consistant looking Publisher files, that are, b) easily updated from the Word docs through link updates (or whatever.) I've only been able to bring over embedded objects from Word as pictures. Thank you. In Publisher, create a text box, right-click, click change text, click text file, browse t...

Is it possible to increase Word's 9 levels of outlining?
Word 2007 permits up to 9 levels of outlining. Is it possible to expand the levels, say to 11 or 12? You can try the workaround described in the following thread: 18 levels of numbering without tears http://groups.google.com/group/microsoft.public.word.numbering/browse_frm/thread/10cfb9ee4c92dd6c/61ec9b5e1bb47320?hl=en-us But note that three or four levels are quite sufficient for most texts. With more levels, it will be difficult to grasp the structure. -- Stefan Blom Microsoft Word MVP "GEM" <GEM@discussions.microsoft.com> wrote in message news:B7...

Can I use solver functions in a protected (locked) worksheet?
I am using the solver function to optimize a blend of products. I want to lock (protect) some areas of the worksheet, but when doing so the solver function will not work and the following translated message arrives: The active document is not a worksheet, is protected or shared. Hope someone can help me. Thank you. Niels ...

get cell of function
Hi Can I somehow determine, in which column (A,B,C,...) a selfmade function is called? Or: Can I tell the function, placed f.e. in cell C1, to loop through the column left (in this example B) of it? thanks lot for help materphilch Dim rng as Range set rng = Application.Caller to see the value: MsgBox(rng.address) Gary's Student "masterphilch" wrote: > Hi > > Can I somehow determine, in which column (A,B,C,...) a selfmade function > is called? > Or: Can I tell the function, placed f.e. in cell C1, to loop through the > column left (in this example ...

Controlling indenting when using Word as email editor in Outlook 2002/XP
Is there a way to turn off the automatic indenting of replies that Word 2002 does when it's selected as the default email editor, We'd like to keep word as the email editor, just looking for a customization --Matt In Tools-> Options-> tab Preferences-> button E-mail Options... you can set your reply/forward preferences. IIRC you cannot remove the indent in Outlook 2002 but I know Outlook 2003 dropped the indent on reply/forward -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Servic...

One of the System Attendant's task is blocked. Function: CMonitoringTask::Work
Hi All, Any help on this is very much appreciated!! Right, here goes! I have two exchange servers which are both running on Win 2k3 SP1. Exchange is 2003 SP1. One of my exchange servers comes to a halt and the only way to get it back up and running is by hard resetting the server! When this has been rebooted the server works fine and reports no errors in the logs after the reboot. However, I am getting the following event logs showing errors prior to reboot: Event Type: Error Event Source: MSExchangeSA Event Category: General Event ID: 1031 Date: 16/10/2006 Time: 1:35:46 AM User: N/A Com...

Variable Functions
I have a spreadsheet that contains a column of numbers. Sometimes I want to know the max of the numbers in the column, sometimes the min, sometimes the average, etc. Is there a way for me to type the word MAX or MIN or AVERAGE or . . . into a cell and have the appropriate value appear right below the word I typed? That would mean that the function would have to be set by the words I type in the cell above where the function is located. Any input would be appreciated. Thanks. Why not just assign 6 cells to provide this info for you. Enter MAX, MIN, and AVG in 3 cells, and under ea...

getting specific info from a word document into excel
I am trying to import a table of data from another programme into excel to create a chart. The table that i am importing is not in table format and is just a word document which looks like a table. Most of the data in the document is words and symbols but I need to highlight the two collumns of numbers only and somehow get them into individual cells in excel. I am having real difficulty doing this as when I try to highlight the collumn and drag down it highlights the whole document as per normal word behaviour. If anyone has any ideas on solving my problem using any aspect of office the...

Help requested in formulating Functions and script to create a mat
Visual Studio.net 2003, SQL Server Report Designer, SQL Query Analyser. I have a table of milestones with data such as project, miletone name, baseline date, planned date and actual date. My task is to produce a chart that has months in the columns and for each month a set of blocks of data, made by concatenating fileds form the table, for milestones due in that month. I can extract the 'blocks' of data easily enough but when I put them in columns each successive month starts on a new line below those of the previous month. I need it so that the first milestone of each ...

Word wrap macro deletes formula
I created a macro to wrap text on a protected worksheet in which each cell contains a formula importing text from another worksheet. The cells are locked and formulas hidden but when I run the macro, it wraps the text and deletes the formula> how can I stop it doing this? The macro is as follows: Sub Wordwrap() ' ' Wordwrap Macro ' Macro recorded 01/10/2004 ' ' Keyboard Shortcut: Ctrl+w ' With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlCenter .WrapText = True .Orientation = 0 .AddIndent = False ...

How can I use the vlookup function to return a sum of the values?
Hi, I am trying to use the vlookup function to return several values as 1 result into 1 single cell. For example, i have a spreadsheet which lists several different dpeartments. These departments may be repaeted many times in the spreadsheet. I need a sum of thoses values to be returned in a separate cell using the vlookup function. Can someone help me on this please? Thanks Chaandni Wrote: > Hi, > > I am trying to use the vlookup function to return several values as 1 > result > into 1 single cell. For example, i have a spreadsheet which lists > several > differ...

How do I "print" without "saving" in word 7?
When I attempt to print in Word 7, instead of printing (after I receive the print dialog box and press ok), a Save dialog box appears. If I say okay to this, the image disappears and the document does not print. All I want to do is print a document or envelope with out saving it. How do I accomplish this simple task in word 7? The printer you have selected as the default is probably one that creates a file, such as the default XPS Document Writer (or whatever it's called) or a fax driver or the Adobe PDF printer. -- Suzanne S. Barnhill Microsoft MVP (Word) Words in...

why has my copy and paste quit working in my words 2007
I did the select all and copy but when I try to paste it just paste an old copy from my clip board and won't paste the new copy Does it work in Word Safe Mode? From Start | Run (Winkey+R), type in winword /a and press Enter. Word will open in safe mode. Open a document and try copy/paste now. Does it work? -- Terry Farrell - MSWord MVP "Sandra Gillhouse" <Sandra Gillhouse@discussions.microsoft.com> wrote in message news:2DFCC793-AA5C-46F6-9D17-87BB8C931F87@microsoft.com... > I did the select all and copy but when I try to paste it just paste an old ...

How to add a column to an existing table and fill it (i.e., fill down) with a particular word / number
Hello - I have a basic question. How do I add a new column to an existing table, and place a word in it so that it repeats all the way down the column? Thanks. Hi Mike What is the point of doing this. If you have a million records you will have a million repetitions of the same text string. If you "really" don't want to add the word as and when needed (very simple in a query report or form) you could use an update querry (if the word may change) or just add a default to the table field which will allow overwritting But again there seems to be no point in this -- Wayn...

Receive all does not check all our e-mail addresses
When I select receive all, Outlook Express only connects to 32 of our e-mail accounts. All the accounts are set up to be included when receiving mail or synchronising. Even my default e-mail account is missed. It would be great if I could pull in all of our e-mails at the click of one button rather than have to check the missed accounts individually. Hi - This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program, despite its similar name.. You will probably get a faster and more expert answer i...