Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Find a value if there continue

Could somebody please help me out of my frustrated state !!
I have an input box that gives me myValue, i then want to look for that
value in a range on another sheet and if found carry on with the code,
if not error msg.


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Find a value if there continue

Try this

Sub test()
Dim FindString As String
FindString = InputBox("Enter a Search value")
If Application.WorksheetFunction.CountIf(Sheets("Shee t2") _
.Range("A1:A100"), FindString) 0 Then
MsgBox "your code"
Else
MsgBox "findstring is not in the range"
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Tempy" wrote in message ...
Could somebody please help me out of my frustrated state !!
I have an input box that gives me myValue, i then want to look for that
value in a range on another sheet and if found carry on with the code,
if not error msg.


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Find a value if there continue

One day i'll also be big !!

Thanks Ron, saved my life again.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Continue Quote Kev Setting up and Configuration of Excel 1 August 8th 09 04:19 PM
Continue equation mparker Excel Discussion (Misc queries) 1 May 11th 09 12:50 PM
to continue down in the same row alex178 Excel Discussion (Misc queries) 2 July 8th 06 05:34 PM
Abort or continue Jason Gatsby Excel Programming 0 August 5th 03 02:16 AM
Abort or continue Ed Ferrero[_4_] Excel Programming 0 August 5th 03 02:01 AM


All times are GMT +1. The time now is 03:10 AM.

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"