다음을 구현하는 동안 유형 미스 매치 오류 또는 0으로 나누기 오류가 항상 나타납니다. 범위의 고유 항목 수를 계산하기를 원합니다. 범위의 항목은 " 클래스 "텍스트 :VBA의 고유 항목 수가
startRow = 3
startColumn = 1
col = "A"
Set topCell = Cells(startRow, startColumn)
Set bottomCell = Cells(Rows.Count, startColumn)
If IsEmpty(bottomCell) Then Set bottomCell = bottomCell.End(xlUp)
Set selectRows = Range(col & topCell.Row & ":" & col & bottomCell.Row)
nRows = WorksheetFunction.CountA(selectRows)
test = WorksheetFunction.SumProduct(WorksheetFunction.IsText(selectRows)/WorksheetFunction.CountIf(selectRows, selectRows))
테스트를위한 계산에 버그가 있지만 이해가되지 않습니다. 어떤 도움은 매우
덕분에 많은
BR 마틴
, 나는 그것이'Range' 받아 들일 것입니다 생각하지 않는다 VBA에서? 나는 그것으로 놀아 왔고 VBA 내에서 워크 시트 기능의 동일한 동작을 가져올 수 없었습니다. – psubsee2003