Code:
Private Sub Button24_Click()
Dim txt As String, r As Range
If WorksheetFunction.CountA(Range("b3:b9")) <> 7 Then Exit Sub
Range("b10") = Empty
txt = Range("b3").Text & "_" & Range("b4").Text & "_" & Range("b5").Text & "_" & Range("b6").Text & "_" & Range("b7").Text & "_" & Range("b8").Text & "_" & Range("b9").Text
For Each r In Range("s3", Cells(3, Columns.Count).End(xlToLeft))
If txt = r.Text & "_" & r.Offset(1).Text & "_" & r.Offset(2).Text & "_" & r.Offset(3).Text & "_" & r.Offset(4).Text & "_" & r.Offset(5).Text & "_" & r.Offset(6).Text Then
Range("b10").Value = r.Offset(7).Value
Exit For
End If
Next
End Sub
hi. how do i go about making this automatic, maybe thru looping? without having to depend on a button?
Thanks!