-
The Find Method in Help is worth studying. (Header address here is assumed as K2)
[VBA]
Sub FindLookup()
Dim ThsBook As Workbook, c As Range, Header As Range
Set Header = [K2]
Application.ScreenUpdating = False
Set c = Columns("K").Find(What:="Zaseden", after:=Header, LookIn:=xlValues, _
LookAt:=xlWhole, MatchCase:=False)
If Not c Is Nothing And Not c.Address = Header.Address Then
MsgBox "Yes it exists"
Exit Sub
End If
MsgBox "Zaseden not found"
Application.ScreenUpdating = True
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules