Double-click on the first button on your form and put this code in the code block that appears -
Dim ws As Variant
Dim lrow As Long, i As Long
With Worksheets("Budget")
lrow = .Range("D" & .Rows.Count).End(xlUp).Row
If lrow > 1 Then .Range("A2:AG" & lrow).ClearContents
End With
For Each ws In Array("Name1", "Name2", "Name3")
With Worksheets(ws)
lrow = .Range("D" & .Rows.Count).End(xlUp).Row
For i = 2 To lrow
If Format(.Range("M" & i).Value, "mm/dd/yyyy") >= Format(DateLokup.TextBox1.Value, "mm/dd/yyyy") And Format(.Range("M" & i).Value, "mm/dd/yyyy") <= Format(DateLokup.TextBox2.Value, "mm/dd/yyyy") Then
.Range("B" & i & ":AG" & i).Copy Worksheets("Budget").Range("B" & Rows.Count).End(xlUp).Offset(1, 0)
End If
Next i
End With
Next ws
Unload DateLokup
Bookmarks