Os itens a seguir devem mostrar o que você está procurando:
Sub Lunch()
Dim i As Integer
Dim NumberOfRows As Integer
Dim ws As Worksheet
Dim Package As Variant
Dim DaySchedule As Variant
Dim StartTime As Variant
Dim Lunch As Variant
Set ws = ActiveSheet
'Set Variables
Package = Application.Match("PACKAGE", ws.Range("1:1"), 0)
DaySchedule = Application.Match("DAY_SCHEDULE", ws.Range("1:1"), 0)
StartTime = Application.Match("START_TIME", ws.Range("1:1"), 0)
Lunch = Application.Match("LUNCH", ws.Range("1:1"), 0)
'Check for missing headers
If IsError(Package) Or IsError(DaySchedule) Or IsError(StartTime) Or IsError(Lunch) Then
MsgBox "One or more of the required headers are missing!", vbCritical, "Error"
Exit Sub
End If
With ws
NumberOfRows = .Cells(.Rows.Count, "B").End(xlUp).Row
'Main Loop
For i = 2 To NumberOfRows
If (((.Cells(i, Package) <> "" And .Cells(i, Package) = .Cells(i + 1, Package)) And _
(.Cells(i, DaySchedule) = .Cells(i + 1, DaySchedule)) And _
(.Cells(i + 1, StartTime) - .Cells(i, StartTime)) > 120)) Then
.Cells(i, Lunch).Value = "TRUE"
Else
.Cells(i, Lunch).Value = "FALSE"
End If
Next
End With
End Sub
Isso pressupõe que seus cabeçalhos de coluna estão na linha 1.