Hi,
Following macro is running slowly (30 minutes). I have to copy paste several rows from each drop down box to new worksheet. However, each time calculations have to be made to get data for each drop down list member (there are about 760 members). I am sending the code below. Is there any way to make it work faster with alternative codes.
Thanks
Sub AllCounties()
'
' AllCounties Macro
'
'
For Counter = 21 To 785
Set curCell = Sheet7.Cells(Counter, 1)
curCell.Copy Destination:=Sheet2.Range("C2")
Application.CutCopyMode = False
Dim Zeile As Long
Zeile = ((Counter - 21) * 1)
Sheet2.Range("e81:I81").Copy
Sheet1.Cells((Zeile + 3), 2).PasteSpecial xlPasteValues
Sheet2.Range("e92:I92").Copy
Sheet1.Cells((Zeile + 3), 7).PasteSpecial xlPasteValues
Sheet2.Range("e103:I103").Copy
Sheet1.Cells((Zeile + 3), 12).PasteSpecial xlPasteValues
Sheet2.Range("e125:I125").Copy
Sheet1.Cells((Zeile + 3), 17).PasteSpecial xlPasteValues
Sheet2.Range("C2").Copy
Sheet1.Cells((Zeile + 3), 1).PasteSpecial xlPasteValues
Next Counter
Sheet2.Activate
Sheet2.Range("C2").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=CountiesStates"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = vbNullString
.ErrorTitle = vbNullString
.InputMessage = vbNullString
.ErrorMessage = vbNullString
.ShowInput = True
.ShowError = True
End With
End Sub
Bookmarks