BakerBaker
New Member
- Joined
- Feb 12, 2018
- Messages
- 38
- Office Version
- 2019
- Platform
- Windows
Thanks in advance.
This is a copy of part of worksheet 1 which is a horse racing rating method:
<tbody>
</tbody>
On each day I can have up to 20 worksheets set out the same but with a different header in A1 (the next worksheet has Chelmsford City 17.15). I do have a macro which combines each worksheet into a single sheet called "Combined" but it will only insert cell A1 from the first sheet with all other A1 cells from other sheets being omitted thus:
<tbody>
</tbody>
<tbody>
</tbody>
In the above example there should be "Chelmsford City 17.15" from worksheet 2, cell A1 in a row above "Horse" which would give a separation to each set of ratings
This is the macro I am using:
Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
Any assistance in achieving my desired result would be appreciated.
This is a copy of part of worksheet 1 which is a horse racing rating method:
Chelmsford City 16.45 (in cell A1) | |
Horse | Points |
Satchville Flyer | 233 |
Irish Times | 177 |
Red Cossack (CAN) | 174 |
Kellington Kitty (USA) | 143 |
Pass The Cristal (IRE) | 138 |
<tbody>
</tbody>
On each day I can have up to 20 worksheets set out the same but with a different header in A1 (the next worksheet has Chelmsford City 17.15). I do have a macro which combines each worksheet into a single sheet called "Combined" but it will only insert cell A1 from the first sheet with all other A1 cells from other sheets being omitted thus:
Chelmsford City 16.45 | |
Horse | Points |
Satchville Flyer | 233 |
Irish Times | 177 |
Red Cossack (CAN) | 174 |
Kellington Kitty (USA) | 143 |
Pass The Cristal (IRE) | 138 |
<tbody>
</tbody>
Horse | Points |
Blue Harmony | 247 |
Pindaric | 246 |
Swiss Cross | 242 |
Magicinthemaking (USA) | 200 |
Mochalov | 200 |
<tbody>
</tbody>
In the above example there should be "Chelmsford City 17.15" from worksheet 2, cell A1 in a row above "Horse" which would give a separation to each set of ratings
This is the macro I am using:
Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
Any assistance in achieving my desired result would be appreciated.