this is for bone block u can generate it for the whole thing easy ozy
Sub y()
Dim i As Double
Dim count As Double
Dim rk As String
count = 0
For i = 1 To 7
If Range("a1").Offset(i - 1, 0) = Range("a1").Offset(i, 0) Then
If Range("c1").Offset(i - 1, 0).Value = "Done" Then count = i
rk = Range("b1").Offset(count, 0).Value
End If
Next i
MsgBox rk
End Sub
|