I need help looping through a given range followed by an if statement. My Range is:
| A | B | C |
-----------------------
|TPA | C:\ | 1.doc|
|TPA | C:\ | 2.doc|
|LAX | D:\ | 3.doc|
I want to loop through A1:C3 and if Column A1:A3 = "TPA" Then take the data of B1 and C1.
Dim test1 As Variant
Dim cell As Range
Dim cell1 As Range
cell = Worksheets("Sheet2").Range ("A1:C3")
cell1 = Worksheets("Sheet2").Range ("A1:A3")
For Each cell1 in cell
If test1 = "TPA" Then
'MsgBox B1 and C1 But I need to MsgBox B2 and C2 as well
End If
Next
Ultimately, I need to msgbox B1 + C1, and B2 + C2.