tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have a sheet that has columns A to BX with data
then I have another sheet were I want to copy the data to make one big column
but its super slow,
I was wouldering if anyone could think of a way to speed it up?
happy for a total reright
heres my code
I have a sheet that has columns A to BX with data
then I have another sheet were I want to copy the data to make one big column
but its super slow,
I was wouldering if anyone could think of a way to speed it up?
happy for a total reright
heres my code
VBA Code:
Sub Make_Single_Gig_List()
Dim StartTime As Double
Dim SecondsElapsed As Double
StartTime = Timer
Application.Calculation = xlManual
Application.ScreenUpdating = False
Sheets("Gig Diary 1 Row").AutoFilterMode = False
Sheets("Gig Diary 1 Row").Range("A2:T25000").EntireRow.Delete
Z = 6
For x = 5 To 75 Step 2
Application.StatusBar = "Progress: " & x & " of 75: " & Format(x / 100, "Percent")
i = Split(ActiveSheet.Cells(2, x).Address, "$")(1)
j = Split(ActiveSheet.Cells(2, Z).Address, "$")(1)
GLR = Sheets("Gig Diary").Cells(Rows.Count, "A").End(xlUp).Row
RLR = Sheets("Gig Diary 1 Row").Cells(Rows.Count, "A").End(xlUp).Row + 1
ELR = GLR + RLR - 3
Sheets("Gig Diary").Range("A3:C" & GLR).Copy Sheets("Gig Diary 1 Row").Range("A" & RLR, "C" & ELR) 'Date+Band+Status
Sheets("Gig Diary").Range("D3:D" & GLR).Copy Sheets("Gig Diary 1 Row").Range("G" & RLR, "G" & ELR) 'Venue address
Sheets("Gig Diary").Range("CB3:CB" & GLR).Copy Sheets("Gig Diary 1 Row").Range("H" & RLR, "H" & ELR) 'music
Sheets("Gig Diary").Range("CE3:CE" & GLR).Copy Sheets("Gig Diary 1 Row").Range("I" & RLR, "I" & ELR) 'type of event
Sheets("Gig Diary").Range(i & "1").Copy Sheets("Gig Diary 1 Row").Range("F" & RLR, "F" & ELR) 'instument
Sheets("Gig Diary").Range(i & "3", j & GLR).Copy Sheets("Gig Diary 1 Row").Range("D" & RLR, "E" & ELR) 'Name + Fee
Z = Z + 2
Next x
Application.StatusBar = "Progress: " & x & " of 100: " & Format(x / 100, "Percent")
Application.Calculation = xlAutomatic
Application.StatusBar = False
SecondsElapsed = Round(Timer - StartTime, 2)
MsgBox "This code ran successfully in " & SecondsElapsed & " seconds", vbInformation
End Sub