Jerry this is my substitue code:
Private Sub cmdUpdateList_Click()
Dim strTargetKey As String, strTemp As String
Dim c As Integer, d As Integer, e As Integer
strTargetKey = Cells(23, 5).Value & Cells(3, 12).Value & Cells(3, 13).Value
c = 29
Do While Cells(i, 3) <> ""
Cells(i, 3) = ""
Cells(i, 4) = ""
Cells(i, 5) = ""
c = c + 1
Loop
i = 4
j = 29
Do While Sheets("Inspections").Cells(i, 9).Value <> ""
strTemp = Sheets("Inspectiions").Cells(i, 11).Value & _
Sheets("Inspections").Cells(i, 9).Value & Sheets("Inspections").Cells(i, 10).Value
If strTemp = strTargetKey Then
Cells(j, 3).Value = Sheets("Inspections").Cells(i, 2).Value
Cells(j, 4).Value = Sheets("Inspections").Cells(i, 5)
Cells(j, 5).Value = Sheets("Inspections").Cells(i, 8)
j = j + 1
End If
i = i + 1
Loop
If j = 29 Then
MsgBox "Computer Says No!"
End If
End Sub
As you can see in the real version I am returning 3 values into the output instead of 2.
However, I'm not sure I have referenced the other sheet "Inspections" correctly and I am also having huge probelms getting the code to apply to the button...essentialy I just need to know how to do it
Also thanks Colin,
I've just got my head around Jerry code today and from that I could imagine your solution would be to create an array / table containing text combinations of my filter paramaters in a specific order?
If so, yeh that would work! Although I suspect this particular functionality might expand to 6 or 7 paramaters which could make this array much bigger.