Я пытаюсь перебрать свой рабочий лист и посчитать, есть ли в них несколько разных диапазонов.В настоящее время я не могу понять, как изменить диапазоны в функции CountA без использования .Select, которую не любит использовать большая часть сообщества VBA, поэтому я стараюсь держаться от этого подальше.
Dim BoxCounter As Integer
Dim TestCounter As Integer
Dim I As Integer
Dim TestExists As Integer
i=0
With ThisWorkbook.Worksheets("Configuration Sheets")
While (BoxCounter <= 571) 'goes to the last row used for this specific sheet.
If (Application.WorksheetFunction.CountA(("F" & (4 + i * 25) & ":F" & (15 + i * 25))) >= 1) Then
TestExists = TestExists + 1
i = i + 1
BoxCounter = BoxCounter + 30 'adds on so that I can loop through all of the rows, 30 is the size of the specific information spaces
Wend
End With