Splitting data by account number


I have a spreadsheet with around 500 accounts in. Each account contains a large number of rows of data. I would like to write a Macro so as to split this data down by the account number. Ideally this would then create a new workbook for each account and save it as the account number. Can someone advise if this is possible and assist in creating the macro if so?