Your ammended request is not very clear,
I assume that the seat number you refer to is in Cells D3 to D7
'Is there a way to write a Macro that will look at Sheet 1, D3 to D7
'and see if there are matches in Columns F to O in Sheet 2,
'and if there are matches then copy and paste the whole row to sheet 1 at A15.
'If there are no matches then Messagebox: "No Requests for this Seat"
Sub test()
LR = 15
For Count = 3 To 7
If Cells(Count, 4).Value = "" Then GoTo Skip
strValueToPick = "SELECT"
With Sheets("Sheet2").Range("F:O")
Set rngFind = .Find(Cells(Count, 4).Value, .Cells(1, 1), LookIn:=xlValues, lookat:=xlWhole)
If Not rngFind Is Nothing Then
strFirstAddress = rngFind.Address
Set rngPicked = rngFind
Do
Set rngPicked = Union(rngPicked, rngFind)
Set rngFind = .FindNext(rngFind)
Loop While Not rngFind Is Nothing And rngFind.Address <> strFirstAddress
End If
End With
If Not rngPicked Is Nothing Then
rngPicked.EntireRow.Copy Sheets("Sheet1").Cells(LR, 1)
Else
MsgBox "No Requests For Seat: " & Cells(Count,4).value , vbOKOnly, "No Requests"
End If
LR = Cells(Rows.Count, 1).End(xlUp).Row + 1
Skip:
Next
End Sub
Bookmarks