MACRO to split data into multiple sheet

Closed
kittyluting22 Posts 1 Registration date Monday 26 June 2017 Status Member Last seen 26 June 2017 - 26 Jun 2017 à 09:22
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 26 Jun 2017 à 11:38
I have a data sheet with below columns, would like a macro to split data into each tab according to cardholder_name if this is possible

Cardholder_Name Merchant Merchant_Location Date_Occurred Date_Posted Settlement_Amount

1 response

TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
26 Jun 2017 à 11:38
Hi Kittyluting22,

See if the following code does as requested:

Sub RunMe()
For Each cell In Range("A2:A" & Range("A1").End(xlDown).Row)
    cell.EntireRow.Copy Sheets(cell.Value).Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Next cell
End Sub


Best regards,
Trowa