Amended code to not added empty worksheets into workbook by filtering the data criteria before sending the data to create the spreadsheet