LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default If no FIND value is found, then a Msgbox to say so and exit sub

Hi Paul,

Thanks a ton for the code advice. Pretty smooth. I did have to change it a
bit so the "Found" cell would be selected and brought into view. This is to
allow a visual verification that the date stamp is in the correct place.
(End users wishes) The Goof Up message box is the watchdog of that but...

Again, thanks a ton Paul, and Chip.
Regards,
Howard

wrote in message
...
The alterations are untested.

HTH
Paul
--------------------------------------------------------------------------

------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------

------------------------------------
Sub BookReturnDate()

Dim aList As Range
Dim rngFind as Range
Dim Bcode As Variant

Bcode = Range("A1").Value
If Bcode = "" Then Exit Sub

Set aList = Range("G2:G2505")
On Error Resume Next

Set rngFind = aList.Find(What:=Bcode)
If not rngFind is Nothing Then
rngFind.Offset(0, 2).Value = Now
Else
msgbox "Goof Up"
End If

End Sub



 
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
colum is not found thats missing a column B how to find it meena Excel Worksheet Functions 1 July 17th 09 10:36 AM
FIND function does not return ZERO when text is not found DOUG01A Excel Worksheet Functions 5 August 5th 08 05:56 PM
How to find a row since I found a value in a column? see example [email protected] Excel Worksheet Functions 1 April 25th 06 05:45 PM
Find text in another workbook and paste if found match - VBA Pasmatos Excel Discussion (Misc queries) 1 November 10th 05 01:00 PM
Copy Rows found using Find All feature Scott H Excel Discussion (Misc queries) 3 May 2nd 05 06:04 PM


All times are GMT +1. The time now is 02:05 PM.

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

About Us

"It's about Microsoft Excel"