I am currently trying to create a list of all possible combinations of entries from two separate sheets, but whenever I try to run it, Excel crashes after about 20 seconds. Does anybody have any tips for how to make this more efficiently, or a way to make this work? Thanks!
Sub Create()
Dim dates, groups, current As Integer
Dim dateValue As Date
Dim groupValue As String
Dim cell As Long
Application.ScreenUpdating = False
Sheets(3).Cells.Clear
cell = 1
For dates = 1 To 730
Sheets(1).Select
dateValue = Cells(dates, 1).Value
For groups = 1 To 155
Application.StatusBar = dateValue & " " & groupValue
Sheets(2).Select
groupValue = Cells(groups, 1).Value
Sheets(3).Select
Cells(cell, 1) = dateValue
Cells(cell, 2) = groupValue
cell = cell + 1
Next groups
Next dates
Application.StatusBar = False
Application.ScreenUpdating = True
End Sub