Option Explicit
Dim wsBD2 As Worksheet
Dim rownumber As Integer
Dim columnnumber As Integer
Dim rowProjectNumber As Integer
Dim columnfrom As Integer
Dim columnto As Integer
Dim projectTitle As Integer
Sub Find_Something()
Set wsBD2 = Worksheets("Blad1")
'Activate your starting column and cell
wsBD2.Range("F4").Activate
rownumber = 4
columnfrom = wsBD2.Range("E4").Column
columnto = wsBD2.Range("J4").Column
'Set the number of cells in the row you want to search through, example: 1 to 1000
For rowProjectNumber = wsBD2.Range("D5") To wsBD2.Range("D6")
'Set projectTitle to whatever you are looking for, example: wsBD2.Range("B2").Value
projectTitle = wsBD2.Range("D" & CStr(rowProjectNumber)).Value
'Set the number of cells in the column you want to search through, example: 1 to 1000
For columnnumber = columnfrom To columnto
'Check for a match to projectTitle
wsBD2.Cells(rownumber, columnnumber).Activate
If ActiveCell.Value = projectTitle Then
'Do something with what your match
MsgBox "Found"
End If
Next columnnumber
Next rowProjectNumber
End Sub
Bookmarks