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

Hello from Steved

Question with the below is it possible to have the same format in other
sheets that it copies to please.

And lastly can I copy the heading from Reporting Sheet to the other sheets
the heading is on row 5, so I would liki it to be placed in row 1 off the
copied sheets please. Thankyou.

Sub test4()
Dim rng As Range
Dim WS As Worksheet
For Each WS In Worksheets
If WS.Name < "Reporting Sheet" Then
Set rng = FilterData(WS.Name)
If Not rng Is Nothing Then
rng.Copy WS.Range("A2")
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
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
2 part ranking question pgarcia Excel Discussion (Misc queries) 1 November 29th 07 12:10 AM
Excel If Then Question - Part 2 [email protected][_2_] Excel Discussion (Misc queries) 3 October 12th 07 08:20 PM
Automation 2-Part Question... Bob Barnes Excel Discussion (Misc queries) 0 March 26th 06 11:54 PM
Macro Question Part II Me Excel Programming 2 March 4th 05 08:55 PM
2 Part Question Steved[_3_] Excel Programming 3 September 3rd 04 01:06 PM


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

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"