Sort List, Create Sheet for each unique item in column, move data

J

J.W. Aldridge

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
 
R

Ron de Bruin

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
 
J

J.W. Aldridge

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top