I need vba to filter data and Copy in a new sheet
I have a excel sheet with 2 sheets (Data) and (Results).
First
In Sheet (Data), I want to apply filter in cell G1 wth Criteria is Begins with “Resolved” and “Sent” and want to copy visible records from A to E and paste in Sheet (Results) from cell A1.
Also assign new serial number starting from 1 from cell A2 to till the end of last record.
If no records, then show message box “No record found” and exit macro. If record found then do above task and move to Second
Second
In Sheet (Data), I want to apply filter in cell G1 with Criteria is Begins with “Resolved” and “Sent” and in cell F1 “Yes” and want to copy visible records from A to E and paste in Sheet (Results) 4 lines after the above pasted records.
Also assign new serial number starting from 1 for newly pasted records in column A.
If no records, then show message box “No second record found” and execute only First macro and exit. If record found then do above task and move to Third
Third
I want to add one sentence in excel sheet (Results) between both first and second i.e. “Below records are YES Records and Below records are excludes no Records”
If there is no record found as per Second filter then ignore Third
Please refer attachment for example.
Request you to provide code
Bookmarks