Generate several excel files according to the values of a cell


I am trying to generate several excel files based on the value of cells belonging to the same column. here is the code i have used but it not working.
Giving this excel file i want to retrieve all rows having value “A” in a different Excel file

Please Help me. @vvaidya

(sortedMyResult.xlsx (9.2 KB)