I am a new VBA user and have run into a problem. I have 3 comboboxes on a worksheet and a list which has 4 columns on another. The first three columns have many duplicate values. I need a function, which when three selections are made will loop through the rows and when a match is found in all three columns the value in the fourth column is copied on to the first worksheet. I know how I can do this for each row individually with IF and Then, but this would very large as there are hundreds of rows. Is there a way to loop through each column and for the rows that match to loop through the next column etc. Any hints on how I could achieve this would be greatly appreciated.
This it what I am trying to achieve for one row, but I need it to loop through all rows:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("D16") = Sheets("Rates List").Range("B5") And Range("D22") = Sheets("Rates List").Range("C5") And Range("E22") = Sheets("Rates List").Range("D5") Then
Range("M22").Value = Sheets("Rates List").Range("F5")
End If
End Sub
Bookmarks