另外當有跨活頁簿時,是否也可以藉由宣告Workbook
Dim wb1 as Workbook
去將wb1.sh1去運用在Excel公式中!?作者: peo.han 時間: 2015-7-26 16:31
目前用到兩個寫法
第一個是用VBA的Application.Function,但效率較差
Dim x1Row As Integer
For x1Row = 11 To sh1.Range("D65536").End(xlUp).Row
Cells(x1Row, 5).Value = Application.CountIf(sh1.Range("C:C"), Cells(x1Row, 4))
Next x1Row