Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Excel datasheet needs dividing into more datasheets

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Excel datasheet needs dividing into more datasheets

The answer to your question is YES. there are tow ways of accomplishing the
task. One is to write a macro from scratch. You did not give enough
information to do this. See other postings for samples of how to post your
request

The 2nds way is to record a macro while you perform the required steps. to
record a macro go to the Tools Menu - Macro - Start Recording. Then perform
a required operartions. stop the macro when you are done. The macro can be
modified manually if changes are required.

"arran tw" wrote:

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Excel datasheet needs dividing into more datasheets

Thanks will give it a try , is there way link the macro to the filter as the
filter see's all the different purchase order numbers, if so create loop to
pick the p/o numerical order.

"Joel" wrote:

The answer to your question is YES. there are tow ways of accomplishing the
task. One is to write a macro from scratch. You did not give enough
information to do this. See other postings for samples of how to post your
request

The 2nds way is to record a macro while you perform the required steps. to
record a macro go to the Tools Menu - Macro - Start Recording. Then perform
a required operartions. stop the macro when you are done. The macro can be
modified manually if changes are required.

"arran tw" wrote:

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Excel datasheet needs dividing into more datasheets

this code will cycle through each item of the filter list

Sub test()

'turn autofilter off
' 1 equals filter number not the column number
ActiveSheet.AutoFilterMode = False

'get unique items in column A
Columns("A:A").AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True
'set variable to unique names
Set unique_cells = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)

'cycle through each unique name
For Each cell In unique_cells
'set number of columns to copy for each filter
Set FilterRange = Range("A:G")
'set filter to each member
FilterRange.AutoFilter Field:=1, Criteria1:=cell
'get the data to copy
Set CopyRange = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)
'copy dataq to sheet 2
CopyRange.EntireRow.Copy Destination:=Sheets("Sheet2").Range("A1")
Next cell

End Sub


"arran tw" wrote:

Thanks will give it a try , is there way link the macro to the filter as the
filter see's all the different purchase order numbers, if so create loop to
pick the p/o numerical order.

"Joel" wrote:

The answer to your question is YES. there are tow ways of accomplishing the
task. One is to write a macro from scratch. You did not give enough
information to do this. See other postings for samples of how to post your
request

The 2nds way is to record a macro while you perform the required steps. to
record a macro go to the Tools Menu - Macro - Start Recording. Then perform
a required operartions. stop the macro when you are done. The macro can be
modified manually if changes are required.

"arran tw" wrote:

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Excel datasheet needs dividing into more datasheets

Hi Joel the code is great, it does what i want apart from generate a new
sheet for each unique number is that possible. Thanx your a star

"Joel" wrote:

this code will cycle through each item of the filter list

Sub test()

'turn autofilter off
' 1 equals filter number not the column number
ActiveSheet.AutoFilterMode = False

'get unique items in column A
Columns("A:A").AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True
'set variable to unique names
Set unique_cells = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)

'cycle through each unique name
For Each cell In unique_cells
'set number of columns to copy for each filter
Set FilterRange = Range("A:G")
'set filter to each member
FilterRange.AutoFilter Field:=1, Criteria1:=cell
'get the data to copy
Set CopyRange = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)
'copy dataq to sheet 2
CopyRange.EntireRow.Copy Destination:=Sheets("Sheet2").Range("A1")
Next cell

End Sub


"arran tw" wrote:

Thanks will give it a try , is there way link the macro to the filter as the
filter see's all the different purchase order numbers, if so create loop to
pick the p/o numerical order.

"Joel" wrote:

The answer to your question is YES. there are tow ways of accomplishing the
task. One is to write a macro from scratch. You did not give enough
information to do this. See other postings for samples of how to post your
request

The 2nds way is to record a macro while you perform the required steps. to
record a macro go to the Tools Menu - Macro - Start Recording. Then perform
a required operartions. stop the macro when you are done. The macro can be
modified manually if changes are required.

"arran tw" wrote:

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Excel datasheet needs dividing into more datasheets

See
http://www.rondebruin.nl/copy5.htm

--

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


"arran tw" wrote in message ...
Hi Joel the code is great, it does what i want apart from generate a new
sheet for each unique number is that possible. Thanx your a star

"Joel" wrote:

this code will cycle through each item of the filter list

Sub test()

'turn autofilter off
' 1 equals filter number not the column number
ActiveSheet.AutoFilterMode = False

'get unique items in column A
Columns("A:A").AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True
'set variable to unique names
Set unique_cells = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)

'cycle through each unique name
For Each cell In unique_cells
'set number of columns to copy for each filter
Set FilterRange = Range("A:G")
'set filter to each member
FilterRange.AutoFilter Field:=1, Criteria1:=cell
'get the data to copy
Set CopyRange = Columns("A:A").SpecialCells(Type:=xlCellTypeVisibl e)
'copy dataq to sheet 2
CopyRange.EntireRow.Copy Destination:=Sheets("Sheet2").Range("A1")
Next cell

End Sub


"arran tw" wrote:

Thanks will give it a try , is there way link the macro to the filter as the
filter see's all the different purchase order numbers, if so create loop to
pick the p/o numerical order.

"Joel" wrote:

The answer to your question is YES. there are tow ways of accomplishing the
task. One is to write a macro from scratch. You did not give enough
information to do this. See other postings for samples of how to post your
request

The 2nds way is to record a macro while you perform the required steps. to
record a macro go to the Tools Menu - Macro - Start Recording. Then perform
a required operartions. stop the macro when you are done. The macro can be
modified manually if changes are required.

"arran tw" wrote:

I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Excel datasheet needs dividing into more datasheets

hi arran

See
http://www.rondebruin.nl/copy5.htm

--

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


"arran tw" wrote in message ...
I have a file that is sent to me on a regular basis, which is to be filtered
into its own purchase order number then copied in its own sheet with other
data, ie model number, serial number ect, there is about 120 rows 4 colums
per sheet, is their any way i can automate this process as there can be about
30 sheets.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to compare old and new datasheets and highlight changes Barry Excel Worksheet Functions 4 February 6th 08 06:33 PM
Excel automatically dividing value by 100... Irfan Khan[_2_] Excel Discussion (Misc queries) 2 January 11th 08 02:14 PM
Excel is dividing my entries...why?? JMc Excel Discussion (Misc queries) 1 October 23rd 07 03:29 AM
datasheet with data that is not graphed help_me_pls Charts and Charting in Excel 1 July 30th 07 06:54 PM
Automate Excel to powerpoint - Graphs along with Datasheet (not workbook) Hari Prasadh Charts and Charting in Excel 4 February 17th 05 02:44 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"