Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
.select efficiency
Selecting cells in a loop routine appears to be terribly inefficient. The code I have is:
Sub errorchk() Dim s1, s2 As String Dim r As Variant Application.ScreenUpdating = False s1 = "sheet1" s2 = "sheet2" For r = 1 To 100 For c = 1 To 26 Cells(r, c).Select If Sheets(s1).Cells(r, c).Value < Sheets(s2).Cells(r, c).Value Then MsgBox "error at " & ActiveCell.Address Next c Next r MsgBox "Check complete" Application.ScreenUpdating = True Range("a1").Select End Sub ... but would be grateful if anyone has code that can do the same quicker as the check range needs to expand. Thank you in anticipation. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Equation Efficiency? | Excel Worksheet Functions | |||
Trying to improve efficiency of array formula | Excel Worksheet Functions | |||
Calculation Efficiency (Speed)? | Excel Discussion (Misc queries) | |||
Range efficiency | Excel Worksheet Functions | |||
Question re efficiency in vlookup | Excel Worksheet Functions |