+ Reply to Thread
Results 1 to 3 of 3

Script to find the word END

  1. #1
    Gary Prescott via OfficeKB.com
    Guest

    Script to find the word END

    I have a report and the END appears believe it or not at the END!!

    However our slave devices are prone to crashes and the full file is not
    always outputed. When I use a macro to disect this report I need it to seach
    column B and find the word END. If this word is not in the report I need it
    flash a pop up warning saying that the full file was not outputed. If its
    there there is no need for a prompt

    Any ideas??

    --
    Message posted via http://www.officekb.com

  2. #2
    Chip Pearson
    Guest

    Re: Script to find the word END

    Try something like the following:

    Dim FoundCell As Range
    Set FoundCell = Range("B:B").Find(what:="END", LookIn:=xlValues,
    _
    lookat:=xlWhole, MatchCase:=False)
    If FoundCell Is Nothing Then
    MsgBox "Not Found"
    Else
    MsgBox "Found at: " & FoundCell.Address
    End If




    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Gary Prescott via OfficeKB.com" <u15117@uwe> wrote in message
    news:578cb6d87a336@uwe...
    >I have a report and the END appears believe it or not at the
    >END!!
    >
    > However our slave devices are prone to crashes and the full
    > file is not
    > always outputed. When I use a macro to disect this report I
    > need it to seach
    > column B and find the word END. If this word is not in the
    > report I need it
    > flash a pop up warning saying that the full file was not
    > outputed. If its
    > there there is no need for a prompt
    >
    > Any ideas??
    >
    > --
    > Message posted via http://www.officekb.com




  3. #3
    Tom Ogilvy
    Guest

    Re: Script to find the word END

    if application.Countif(Columns(2),"END") = 0 Then
    msgbox "End not found"
    End if

    --
    Regards,
    Tom Ogilvy


    "Gary Prescott via OfficeKB.com" <u15117@uwe> wrote in message
    news:578cb6d87a336@uwe...
    > I have a report and the END appears believe it or not at the END!!
    >
    > However our slave devices are prone to crashes and the full file is not
    > always outputed. When I use a macro to disect this report I need it to

    seach
    > column B and find the word END. If this word is not in the report I need

    it
    > flash a pop up warning saying that the full file was not outputed. If its
    > there there is no need for a prompt
    >
    > Any ideas??
    >
    > --
    > Message posted via http://www.officekb.com




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1