Hi Guys,
I once again call upon your collective wisdom.
I have written some code, below, which runs through a sheet and looking at whether or not an Item has a number of a blank cell assigned to it, it then pulls out the relative data and places it into another sheet.
There are many different combinations to review and normally results in excess of 80k records being picked up.
The issue is that currently is it taking almost 2 hours for the code to run through, and I want to try and speed it up, is there a way that I can do this?
I know that I have a status bar update as part of the code, and by eliminating this I would save some time, but that is a miniscule saving compared to the overall run time.
I have attached the file also to review.
Sub newresults()
Application.ScreenUpdating = False
Dim Destn As Range, Allsheet As Worksheet, MScll As Range, Storecll As String, MScount As Range, Storecount As Range, sls As Range
Dim col As Integer, rw As Integer
Set Destn = Sheets("Results").Cells(2, 1)
Set Allsheet = Sheets("All")
rw = 5
For Each Storecount In Allsheet.Range(Allsheet.Cells(6, 1), Allsheet.Cells(6, 1).End(xlDown)).Cells
Set storecell = Storecount
rw = rw + 1
col = 2
For Each MScount In Allsheet.Range(Allsheet.Cells(5, 2), Allsheet.Cells(5, 2).End(xlToRight)).Cells
Set MScll = MScount
Set sls = Allsheet.Range(Allsheet.Cells(rw, col), Allsheet.Cells(rw, col)).Cells
col = col + 1
If sls = 0 Then
storecell.Copy Destn
Set Destn = Destn.Offset(0, 1)
MScll.Copy Destn
Set Destn = Destn.Offset(1, -1)
Application.StatusBar = Destn.Address
DoEvents
Else
End If
Next MScount
Next Storecount
Application.ScreenUpdating = True
Sheets("Results").Select
End Sub