Sub A_ParseDCPoints()
'This activates all of the copy-paste macros
ParseSheetDC07
ParseSheetDC06
ParseSheetDC05
ParseSheetDC04
ParseSheetDC03
ParseSheetDC02
ParseSheetDC01
End Sub
Sub ParseSheet01()
'Take the DC01 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON01 As Range, DCOFF01 As Range, i As Long
Set DCON01 = Cells.Find(What:="DataCollection01On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON01 Is Nothing Then: MsgBox "Can't find DataCollection01On": Exit Sub
Set DCOFF01 = Cells.Find(What:="DataCollection01Off")
If DCOFF01 Is Nothing Then: MsgBox "Can't find DataCollection01Off": Exit Sub
'Selects the specified range and copies it
Range(DCON01, DCOFF01).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC01"
ActiveSheet.Name = "DC01"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC01").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC01"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC02()
'Take the DC02 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON02 As Range, DCOFF02 As Range, i As Long
Set DCON02 = Cells.Find(What:="DataCollection02On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON02 Is Nothing Then: MsgBox "Can't find DataCollection02On": Exit Sub
Set DCOFF02 = Cells.Find(What:="DataCollection02Off")
If DCOFF02 Is Nothing Then: MsgBox "Can't find DataCollection02Off": Exit Sub
'Selects the specified range and copies it
Range(DCON02, DCOFF02).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC02"
ActiveSheet.Name = "DC02"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC02").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC02"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC03()
'Take the DC03 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON03 As Range, DCOFF03 As Range, i As Long
Set DCON03 = Cells.Find(What:="DataCollection03On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON03 Is Nothing Then: MsgBox "Can't find DataCollection03On": Exit Sub
Set DCOFF03 = Cells.Find(What:="DataCollection03Off")
If DCOFF03 Is Nothing Then: MsgBox "Can't find DataCollection03Off": Exit Sub
'Selects the specified range and copies it
Range(DCON03, DCOFF03).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC03"
ActiveSheet.Name = "DC03"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC03").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC03"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC04()
'Take the DC04 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON04 As Range, DCOFF04 As Range, i As Long
Set DCON04 = Cells.Find(What:="DataCollection04On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON04 Is Nothing Then: MsgBox "Can't find DataCollection04On": Exit Sub
Set DCOFF04 = Cells.Find(What:="DataCollection04Off")
If DCOFF04 Is Nothing Then: MsgBox "Can't find DataCollection04Off": Exit Sub
'Selects the specified range and copies it
Range(DCON04, DCOFF04).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC04"
ActiveSheet.Name = "DC04"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC04").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC04"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC05()
'Take the DC05 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON05 As Range, DCOFF05 As Range, i As Long
Set DCON05 = Cells.Find(What:="DataCollection05On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON05 Is Nothing Then: MsgBox "Can't find DataCollection05On": Exit Sub
Set DCOFF05 = Cells.Find(What:="DataCollection05Off")
If DCOFF05 Is Nothing Then: MsgBox "Can't find DataCollection05Off": Exit Sub
'Selects the specified range and copies it
Range(DCON05, DCOFF05).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC05"
ActiveSheet.Name = "DC05"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC05").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC05"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC06()
'Take the DC06 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON06 As Range, DCOFF06 As Range, i As Long
Set DCON06 = Cells.Find(What:="DataCollection06On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON06 Is Nothing Then: MsgBox "Can't find DataCollection06On": Exit Sub
Set DCOFF06 = Cells.Find(What:="DataCollection06Off")
If DCOFF06 Is Nothing Then: MsgBox "Can't find DataCollection06Off": Exit Sub
'Selects the specified range and copies it
Range(DCON06, DCOFF06).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC06"
ActiveSheet.Name = "DC06"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC06").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC06"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Sub ParseSheetDC07()
'Take the DC07 Range and paste in a new sheet
Sheets("Sheet1").Select 'This selects sheet 1
'Following sets the range
Dim DCON07 As Range, DCOFF07 As Range, i As Long
Set DCON07 = Cells.Find(What:="DataCollection07On", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If DCON07 Is Nothing Then: MsgBox "Can't find DataCollection07On": Exit Sub
Set DCOFF07 = Cells.Find(What:="DataCollection07Off")
If DCOFF07 Is Nothing Then: MsgBox "Can't find DataCollection07Off": Exit Sub
'Selects the specified range and copies it
Range(DCON07, DCOFF07).EntireRow.Select
Selection.Copy
'Creates new sheet to paste rows and data into
Worksheets.Add(After:=Worksheets(1)).Name = "DC07"
ActiveSheet.Name = "DC07"
Range("A5").Select
ActiveSheet.Paste
'Paste Header and Add a splitscreen between the headers and data
Sheets("Sheet1").Select
Rows("1:1").Select
Selection.Copy
Sheets("DC07").Select
Rows("1:1").Select
ActiveSheet.Paste
ActiveSheet.Name = "DC07"
Rows("3:3").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 2
End With
End Sub
Bookmarks