Search In Sheet using macro

  • Thread starter Thread starter slideman
  • Start date Start date
S

slideman

Hello,

I will explain my problem :
I have a workbook with 3 sheet.
I want to search if a value exist in one of the sheet, and if it exist
I want it to say true, if not exist false.
I need it by VBA macro, and not with Lookup.

Thanks for you help, :D
 
Try this slideman

Sub test()
If Application.WorksheetFunction.CountIf _
(Sheets("Sheet1").Cells, "ron") = 0 Then
MsgBox "False"
Else
MsgBox "True"
End If
End Sub
 
Back
Top