try this:
Sub sort()
Dim i As Integer
Dim j As Integer
Dim colheader As Variant 'if its number or text just adjust as needed
Dim rowheader As Variant 'if its number or text just adjust as needed
Dim variable_X As Date
For i = 2 To 500
For j = 2 To 702
If Cells(i, j) > VBA.Date And Cells(, j) < variable_X Then 'taken from useform
colheader = Cells(1, j)
rowheader = Cells(i, 1)
'code to populate worksheet here before the loop continues the search
End If
Next j
Next i
End Sub
you might hit some snags with the date formats. Ensure that the date is properly formatted in the cells and coming out of your useform. I assumes variable_X is bigger than today's date. If not just adjust the instruction accordingly
cheers
Bookmarks