One way...
Option Explicit
Sub GetValues()
Dim Temp(), Min As Double, Max As Double, cell As Range, x As Long, col As Long
Min = 40000: Max = 50000: x = 1
For Each cell In Range("D5:D16,F5:F16,H5:H16,K5:K16,M5:M16,O5:O16")
If cell.Value > Min And cell < Max Then
If cell.Column > 8 Then col = 10 Else col = 3
ReDim Preserve Temp(x)
Temp(x) = Cells(2, col) & "-" & Format(Cells(cell.Row, 1), "00") & "-" & Cells(3, cell.Column - 1)
x = x + 1
End If
Next cell
Cells(2, 17).Resize(x) = Application.WorksheetFunction.Transpose(Temp)
End Sub
Bookmarks