Hello,
I have the current code:
LowMin(1, LowMinCount) = Application.WorksheetFunction.Min(LowCellValue(1, LowCellCount), LowCellValue(1, LowCellCount + 1), LowCellValue(1, LowCellCount + 2), LowCellValue(1, LowCellCount + 3), LowCellValue(1, LowCellCount + 4), LowCellValue(1, LowCellCount + 5), LowCellValue(1, LowCellCount + 6), LowCellValue(1, LowCellCount + 7))
I am running this code within a loop of 8. It works fine as long as I have an amount of rows that is even with 8. But If I have for example 37 rows than I get an error. Is there a way to rewrite this code so I can sample either 8 rows or just the remaining rows?
I have the current code:
LowMin(1, LowMinCount) = Application.WorksheetFunction.Min(LowCellValue(1, LowCellCount), LowCellValue(1, LowCellCount + 1), LowCellValue(1, LowCellCount + 2), LowCellValue(1, LowCellCount + 3), LowCellValue(1, LowCellCount + 4), LowCellValue(1, LowCellCount + 5), LowCellValue(1, LowCellCount + 6), LowCellValue(1, LowCellCount + 7))
I am running this code within a loop of 8. It works fine as long as I have an amount of rows that is even with 8. But If I have for example 37 rows than I get an error. Is there a way to rewrite this code so I can sample either 8 rows or just the remaining rows?