Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default To named Sheets

Hello from Steved

The below will copy to each named worksheet.

Can it be devoloped to copy City to City WorkSheet, Roskill to Roskill
Worksheet, Papakura to Papakura Worksheet, Wiri to Wiri Worksheet, Shore to
Shore Worksheet, Orewa to Orewa Worksheet, Swanson to Swanson Worksheet,
Waiheke to Waiheke Worksheet and Wellington to to Wellington Worksheet all
from the worksheet called Audit Report. Thankyou.

Sub test3()

Dim Source As Range
Dim WS As Worksheet
Set Source = Worksheets("Audit Report").Range("A6:Q255")
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
With Source
WS.Range("A6").Resize(.Rows.Count, .Columns.Count).Value = .Value
End With
End If
Next
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default To named Sheets

What is City, Roskill, etc on Audit Report?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

The below will copy to each named worksheet.

Can it be devoloped to copy City to City WorkSheet, Roskill to Roskill
Worksheet, Papakura to Papakura Worksheet, Wiri to Wiri Worksheet, Shore

to
Shore Worksheet, Orewa to Orewa Worksheet, Swanson to Swanson Worksheet,
Waiheke to Waiheke Worksheet and Wellington to to Wellington Worksheet all
from the worksheet called Audit Report. Thankyou.

Sub test3()

Dim Source As Range
Dim WS As Worksheet
Set Source = Worksheets("Audit Report").Range("A6:Q255")
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
With Source
WS.Range("A6").Resize(.Rows.Count, .Columns.Count).Value =

..Value
End With
End If
Next
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default To named Sheets

Hello Bob from Steved

Col A contains City, Roskill, etc
Col B Contains the Date
Col C Contains the Time
Col's D, F, to L and O, P Contains Numerials
Col's E, M, Q Contains Text

Starts at row 6 to 255

Hope this is helpful and Thankyou.

"Bob Phillips" wrote:

What is City, Roskill, etc on Audit Report?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

The below will copy to each named worksheet.

Can it be devoloped to copy City to City WorkSheet, Roskill to Roskill
Worksheet, Papakura to Papakura Worksheet, Wiri to Wiri Worksheet, Shore

to
Shore Worksheet, Orewa to Orewa Worksheet, Swanson to Swanson Worksheet,
Waiheke to Waiheke Worksheet and Wellington to to Wellington Worksheet all
from the worksheet called Audit Report. Thankyou.

Sub test3()

Dim Source As Range
Dim WS As Worksheet
Set Source = Worksheets("Audit Report").Range("A6:Q255")
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
With Source
WS.Range("A6").Resize(.Rows.Count, .Columns.Count).Value =

..Value
End With
End If
Next
End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default To named Sheets

Hello Steved,

Here's a shot

Sub test3()
Dim rng As Range
Dim WS As Worksheet
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
Set rng = FilterData(WS.Name)
If Not rng Is Nothing Then
rng.Copy WS.Range("A1")
End If
End If
Next WS
End Sub

Private Function FilterData(sCity As String) As Range
Dim cRows As Long
Range("A1").EntireRow.Insert
Range("A1").FormulaR1C1 = "temp"
cRows = Cells(Rows.Count, "A").End(xlUp).Row
With Columns("A:A")
.AutoFilter
.AutoFilter Field:=1, Criteria1:=sCity
End With
Set FilterData = Range("A2:A" &
cRows).SpecialCells(xlCellTypeVisible).EntireRow
Rows("1:1").Delete Shift:=xlUp
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello Bob from Steved

Col A contains City, Roskill, etc
Col B Contains the Date
Col C Contains the Time
Col's D, F, to L and O, P Contains Numerials
Col's E, M, Q Contains Text

Starts at row 6 to 255

Hope this is helpful and Thankyou.

"Bob Phillips" wrote:

What is City, Roskill, etc on Audit Report?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

The below will copy to each named worksheet.

Can it be devoloped to copy City to City WorkSheet, Roskill to Roskill
Worksheet, Papakura to Papakura Worksheet, Wiri to Wiri Worksheet,

Shore
to
Shore Worksheet, Orewa to Orewa Worksheet, Swanson to Swanson

Worksheet,
Waiheke to Waiheke Worksheet and Wellington to to Wellington Worksheet

all
from the worksheet called Audit Report. Thankyou.

Sub test3()

Dim Source As Range
Dim WS As Worksheet
Set Source = Worksheets("Audit Report").Range("A6:Q255")
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
With Source
WS.Range("A6").Resize(.Rows.Count, .Columns.Count).Value =

..Value
End With
End If
Next
End Sub






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default To named Sheets

Thanks Bob Excellent.

"Bob Phillips" wrote:

Hello Steved,

Here's a shot

Sub test3()
Dim rng As Range
Dim WS As Worksheet
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
Set rng = FilterData(WS.Name)
If Not rng Is Nothing Then
rng.Copy WS.Range("A1")
End If
End If
Next WS
End Sub

Private Function FilterData(sCity As String) As Range
Dim cRows As Long
Range("A1").EntireRow.Insert
Range("A1").FormulaR1C1 = "temp"
cRows = Cells(Rows.Count, "A").End(xlUp).Row
With Columns("A:A")
.AutoFilter
.AutoFilter Field:=1, Criteria1:=sCity
End With
Set FilterData = Range("A2:A" &
cRows).SpecialCells(xlCellTypeVisible).EntireRow
Rows("1:1").Delete Shift:=xlUp
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello Bob from Steved

Col A contains City, Roskill, etc
Col B Contains the Date
Col C Contains the Time
Col's D, F, to L and O, P Contains Numerials
Col's E, M, Q Contains Text

Starts at row 6 to 255

Hope this is helpful and Thankyou.

"Bob Phillips" wrote:

What is City, Roskill, etc on Audit Report?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

The below will copy to each named worksheet.

Can it be devoloped to copy City to City WorkSheet, Roskill to Roskill
Worksheet, Papakura to Papakura Worksheet, Wiri to Wiri Worksheet,

Shore
to
Shore Worksheet, Orewa to Orewa Worksheet, Swanson to Swanson

Worksheet,
Waiheke to Waiheke Worksheet and Wellington to to Wellington Worksheet

all
from the worksheet called Audit Report. Thankyou.

Sub test3()

Dim Source As Range
Dim WS As Worksheet
Set Source = Worksheets("Audit Report").Range("A6:Q255")
For Each WS In Worksheets
If WS.Name < "Audit Report" Then
With Source
WS.Range("A6").Resize(.Rows.Count, .Columns.Count).Value =
..Value
End With
End If
Next
End Sub






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
how do i add up the same cell from multiple named tab sheets Paul Excel Discussion (Misc queries) 1 December 8th 08 02:43 PM
List Sheets excluding sheets named ***-A Dolphinv4 Excel Discussion (Misc queries) 1 December 15th 07 09:29 AM
Add new named sheets David T Excel Discussion (Misc queries) 2 February 21st 07 04:33 AM
Rows to Named Sheets Steved Excel Worksheet Functions 2 August 8th 06 10:44 AM
Named list of sheets Ch. Kinnewig Excel Worksheet Functions 2 March 1st 05 10:09 AM


All times are GMT +1. The time now is 10:59 AM.

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

About Us

"It's about Microsoft Excel"