Good afternoon everyone,
I am new here and only have reasonable knowledge about VBA, so please excuse if my terminology may not be right.
I have an excel file with several macros I have written. The main macro applies an autofilter to all my data based on a criteria I type in a cell on a separate sheet within the same workbook. The filter is working fine and if the criteria specified matches a record in my data then that data is copied and pasted into a separate sheet. Unfortunately, however, if I enter a criteria that is not present in the data, excel/VBA copies all of my data (each of the 7000 records) and pastes the entire data into the separate sheet although no result was actually found. I was hoping you would be able to give me advice on how to overcoem this and what code to use to make the filter work properly.
Basically what I want is that if the filter cannot match any data, then no data is copied/pasted. My macro checks several criteria (total 8) and then applies the autofilter. I don't know if I would need a code and add that to each of my code lines for each criteria, or only one at the end.
Thank you for your help!