Цитата
To find cells that match more complicated patterns, use a For Each...Next statement with the Like operator. For example, the following code searches for all cells in the range A1:C5 that use a font whose name starts with the letters Cour. When Microsoft Excel finds a match, it changes the font to Times New Roman.
For Each c In [A1:C5] If c.Font.Name Like "Cour*" Then c.Font.Name = "Times New Roman" End If
Next
По 2000000 ячеек должно пробегать достаточно быстро, даже если вдруг придётся пробегать все.
Код
For Each c In [A1:FF]
If c.Value>100 and c.Value>150 Then
MsgBox("Found")
End For
End If
Next
If c.Value>100 and c.Value>150 Then
MsgBox("Found")
End For
End If
Next
Прошу прощения, если что не так, не проверял код и давно уже не пишу на VBA, приходилось как-то один семестр, но дело было давно.