在VBA中查找列的最大值

nas*_*nas 6 vba max

我试图找到A2到A999内的单元格的最大值.我试图做一个For循环来遍历每一个,但是找到最大rcell的逻辑有问题.我希望有一个内置的rcell.max功能?

Set rng = loopset.range("A2-A999")
For Each rcell in rrng.cells
'Find the max rcell
Next rcell
Run Code Online (Sandbox Code Playgroud)

nwh*_*ght 10

Application.worksheetfunction.max(range("a:a")) 会为你做的