ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort List, Create Sheet for each unique item in column, move data (https://www.excelbanter.com/excel-programming/409216-sort-list-create-sheet-each-unique-item-column-move-data.html)

J.W. Aldridge

Sort List, Create Sheet for each unique item in column, move data
 
I have data in columns A:P65000 on "DataSheet". (Row 1 includes the
header for each row.) In column P, I have the group names.

I want to move (not copy) each row to its own sheet (and name it)
based on the unique group names in column p.


I have seen several codes claiming to do this (and actually may) but I
cant get them to work for me.


thanx

Ron de Bruin

Sort List, Create Sheet for each unique item in column, move data
 
Hi J.W. Aldridge

See this page
http://www.rondebruin.nl/copy5.htm#sheet

Change this part

'Set filter range : A1 is the top left cell of your filter range and
'the header of the first column, D is the last column in the filter range
Set rng = ws1.Range("A1:D" & Rows.Count)

'Set Field number of the filter column
'This example filters on the first field in the range(change the field if needed)
'In this case the range starts in A so Field:=1 is column A, 2 = column B, ......
FieldNum = 1


To

'Set filter range : A1 is the top left cell of your filter range and
'the header of the first column, D is the last column in the filter range
Set rng = ws1.Range("A1:P" & Rows.Count)

'Set Field number of the filter column
'This example filters on the first field in the range(change the field if needed)
'In this case the range starts in A so Field:=1 is column A, 2 = column B, ......
FieldNum = 16

And change the name of the sheet to the sheet with your data
'Name of the sheet with your data
Set ws1 = Sheets("Sheet1") '<<< Change


I want to move (not copy

After the code is ready delete the records on the datasheet



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"J.W. Aldridge" wrote in message
...
I have data in columns A:P65000 on "DataSheet". (Row 1 includes the
header for each row.) In column P, I have the group names.

I want to move (not copy) each row to its own sheet (and name it)
based on the unique group names in column p.


I have seen several codes claiming to do this (and actually may) but I
cant get them to work for me.


thanx



J.W. Aldridge

Sort List, Create Sheet for each unique item in column, move data
 
Thanx a million!


One more question though....

If I were to clear the DataSheet, then update it with similar data,
how could I get it to add to the current sheet (the next available
row) provided the group name is the same.


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com