Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hi, i need help whit macros

I have a table where several records come from the A5 to the AH100

From these records I have to generate several new sheets, this would
be an example

Employee Type function
Carlos GT Wash.
Pedro JR Ironing
Pedro JR Fold
Raul KL Deliver
Raul KL Charge
Jose MT Shopping

So I need to be separated into various sheets for employee and full
row

Employee Type function
Carlos GT Wash.

Employee Type function
Pedro JR Ironing
Pedro JR Fold

Employee Type function
Raul KL Deliver
Raul KL Charge

Employee Type function
Jose MT Shopping

I have this code I found on the network and that if I generate new
leaf with the first employee but did not make me much more.

Sub Hoja_x_Auditor_Interno()
Application.ScreenUpdating = False
Dim Celda As Range
With Worksheets("Indicadores Internas").Range("A5").CurrentRegion
..Parent.Range("A6,AH6") = .Cells(1)
..Resize(, 1).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=.Parent.Range("BT6"), Unique:=True
..Parent.Range("BT6").Sort _
Key1:=.Parent.Range("BT7"), Order1:=xlAscending, Header:=True
With .Parent.Range("BT6").CurrentRegion
For Each Celda In .Offset(1).Resize(.Rows.Count - 1)
..Parent.Range("AO7") = Celda
With Worksheets.Add(After:=Worksheets(Worksheets.Count) )
..Name = Celda
End With
..Parent.Range("A5").CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=.Parent.Range("AO6:AO7"), _
CopyToRange:=Range("A5:AH5")
Next
End With
..Parent.Columns("AO:BT").Clear
Debug.Print .Parent.UsedRange.Address
End With
End Sub


Thanks

I wait your answers
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hi, i need help whit macros

I'd look at these techniques:

Ron de Bruin's EasyFilter addin:
http://www.rondebruin.nl/easyfilter.htm

Code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- replaces old data with current.
AdvFilterCity.xls 55 kb

Ricardo_TS wrote:

I have a table where several records come from the A5 to the AH100

From these records I have to generate several new sheets, this would
be an example

Employee Type function
Carlos GT Wash.
Pedro JR Ironing
Pedro JR Fold
Raul KL Deliver
Raul KL Charge
Jose MT Shopping

So I need to be separated into various sheets for employee and full
row

Employee Type function
Carlos GT Wash.

Employee Type function
Pedro JR Ironing
Pedro JR Fold

Employee Type function
Raul KL Deliver
Raul KL Charge

Employee Type function
Jose MT Shopping

I have this code I found on the network and that if I generate new
leaf with the first employee but did not make me much more.

Sub Hoja_x_Auditor_Interno()
Application.ScreenUpdating = False
Dim Celda As Range
With Worksheets("Indicadores Internas").Range("A5").CurrentRegion
.Parent.Range("A6,AH6") = .Cells(1)
.Resize(, 1).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=.Parent.Range("BT6"), Unique:=True
.Parent.Range("BT6").Sort _
Key1:=.Parent.Range("BT7"), Order1:=xlAscending, Header:=True
With .Parent.Range("BT6").CurrentRegion
For Each Celda In .Offset(1).Resize(.Rows.Count - 1)
.Parent.Range("AO7") = Celda
With Worksheets.Add(After:=Worksheets(Worksheets.Count) )
.Name = Celda
End With
.Parent.Range("A5").CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=.Parent.Range("AO6:AO7"), _
CopyToRange:=Range("A5:AH5")
Next
End With
.Parent.Columns("AO:BT").Clear
Debug.Print .Parent.UsedRange.Address
End With
End Sub

Thanks

I wait your answers


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hi, i need help whit macros

On 24 sep, 10:14, Dave Peterson wrote:
I'd look at these techniques:

Ron de Bruin's EasyFilter addin:http://www.rondebruin.nl/easyfilter.htm

Code from Debra Dalgleish's site:http://www.contextures.com/excelfiles.html

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- replaces old data with current.
AdvFilterCity.xls 55 kb





Ricardo_TS wrote:

I have a table where several records come from the A5 to the AH100


From these records I have to generate several new sheets, this would
be an example


Employee * * * *Type * * * * *function
Carlos * * * * * * * GT * * * * * *Wash.
Pedro * * * * * * * *JR * * * * * *Ironing
Pedro * * * * * * * *JR * * * * * * *Fold
Raul * * * * * * * * *KL * * * * * Deliver
Raul * * * * * * * * *KL * * * * * Charge
Jose * * * * * * * * MT * * * * *Shopping


So I need to be separated into various sheets for employee and full
row


Employee * * * * Type * * * * * * function
Carlos * * * * * * * GT * * * * * * * *Wash.


Employee * * * * Type * * * * * * function
Pedro * * * * * * * * JR * * * * * * *Ironing
Pedro * * * * * * * * JR * * * * * * *Fold


Employee * * * * Type * * * * * * function
Raul * * * * * * * * *KL * * * * * * * Deliver
Raul * * * * * * * * *KL * * * * * * * Charge


Employee * * * * Type * * * * * *function
Jose * * * * * * * * MT * * * * * * *Shopping


I have this code I found on the network and that if I generate new
leaf with the first employee but did not make me much more.


Sub Hoja_x_Auditor_Interno()
Application.ScreenUpdating = False
Dim Celda As Range
With Worksheets("Indicadores Internas").Range("A5").CurrentRegion
.Parent.Range("A6,AH6") = .Cells(1)
.Resize(, 1).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=.Parent.Range("BT6"), Unique:=True
.Parent.Range("BT6").Sort _
Key1:=.Parent.Range("BT7"), Order1:=xlAscending, Header:=True
With .Parent.Range("BT6").CurrentRegion
For Each Celda In .Offset(1).Resize(.Rows.Count - 1)
.Parent.Range("AO7") = Celda
With Worksheets.Add(After:=Worksheets(Worksheets.Count) )
.Name = Celda
End With
.Parent.Range("A5").CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=.Parent.Range("AO6:AO7"), _
CopyToRange:=Range("A5:AH5")
Next
End With
.Parent.Columns("AO:BT").Clear
Debug.Print .Parent.UsedRange.Address
End With
End Sub


Thanks


I wait your answers


--

Dave Peterson- Ocultar texto de la cita -

- Mostrar texto de la cita -


Thanks Dave, I watch the techniques, and i tell you what happen
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
lock cell whit first value cferoiu Excel Worksheet Functions 5 May 30th 09 08:43 AM
Sum of cells whit the same name Mark J Excel Worksheet Functions 2 January 23rd 06 04:55 PM
what is happening whit my controls filo666 Excel Programming 0 November 24th 05 04:56 PM
Two columns whit same value ceconik[_4_] Excel Programming 3 October 14th 05 10:18 AM
help whit hyperlink Didier Lizard Excel Programming 1 July 12th 03 01:26 PM


All times are GMT +1. The time now is 12:47 PM.

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"