Basically ill need a code to filter out:
Done:
Find data and paste to FIN_sheet Based on cell (A1 from TEMPLATE_sheet)
Query:
Find data and paste to FIN_sheet Based on cell (A1 & Date in C1 from TEMPLATE_sheet)
See image:
TEMPLATE_sheet
FIN_sheet
Already have the Code for add i just need the additional code for DATE (ADD PER DM):
Sub DATA()
Dim wsData As Worksheet
Dim wsTemp As Worksheet
Dim v As Variant
Dim lr As Long
Dim r As Long
Application.ScreenUpdating = False
' Set worksheet variables
Set wsData = Sheets("TEMPLATE")
Set wsTemp = Sheets("FIN")
' Capture value to filter on
v = wsData.Range("A1")
' First clear range on TEMPLATE_SHEET
' wsTemp.Activate
' Rows("4:" & Rows.Count).Delete
' Find last row on DATA_SHEET
wsData.Activate
lr = Cells(Rows.Count, "B").End(xlUp).Row
' Loop through all rows on DATA_SHEET
For r = 1 To lr
' Check value in column A
If Cells(r, "B") = v Then
' Copy columns B-D to TEMPLATE_SHEET
Range(Cells(r, "A"), Cells(r, "D")).Copy wsTemp.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End If
Next r
Call ADD_SEQ_01
Application.Wait (Now + TimeValue("00:00:01"))
Call ADD_SEQ_02
Application.ScreenUpdating = True
wsTemp.Activate
MsgBox "ADDED_-WNDNCG"
End Sub
Done:
Find data and paste to FIN_sheet Based on cell (A1 from TEMPLATE_sheet)
Query:
Find data and paste to FIN_sheet Based on cell (A1 & Date in C1 from TEMPLATE_sheet)
See image:
TEMPLATE_sheet
FIN_sheet
Already have the Code for add i just need the additional code for DATE (ADD PER DM):
Sub DATA()
Dim wsData As Worksheet
Dim wsTemp As Worksheet
Dim v As Variant
Dim lr As Long
Dim r As Long
Application.ScreenUpdating = False
' Set worksheet variables
Set wsData = Sheets("TEMPLATE")
Set wsTemp = Sheets("FIN")
' Capture value to filter on
v = wsData.Range("A1")
' First clear range on TEMPLATE_SHEET
' wsTemp.Activate
' Rows("4:" & Rows.Count).Delete
' Find last row on DATA_SHEET
wsData.Activate
lr = Cells(Rows.Count, "B").End(xlUp).Row
' Loop through all rows on DATA_SHEET
For r = 1 To lr
' Check value in column A
If Cells(r, "B") = v Then
' Copy columns B-D to TEMPLATE_SHEET
Range(Cells(r, "A"), Cells(r, "D")).Copy wsTemp.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End If
Next r
Call ADD_SEQ_01
Application.Wait (Now + TimeValue("00:00:01"))
Call ADD_SEQ_02
Application.ScreenUpdating = True
wsTemp.Activate
MsgBox "ADDED_-WNDNCG"
End Sub