Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find a particular word? Jack Excel Worksheet Functions 20 December 2nd 09 12:04 PM
Visual Script to find smallest number greater than 0 Jeremy Excel Discussion (Misc queries) 3 October 30th 09 08:32 PM
HOW CAN I REMOVE SCRIPT ERROR FROM MICROSOFT WORD AND EXCEL. HASSAN HAMMOUD Excel Discussion (Misc queries) 2 December 8th 07 04:14 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
Find Whole Word Only Lonely[_3_] Excel Programming 2 December 11th 03 04:41 PM


All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"