Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任何人都可以帮助更正代码吗?它总是返回零,为什么?我想比较 H 列中的数据,并提取值,存储在 offset(1,2) 中。请帮助检查我的错误,非常感谢
Dim Highest As Double Highest = Application.WorksheetFunction.Max(Columns("H")) wkbCrntWorkBook.Activate ActiveCell.Offset(1, 2).Value = Highest
试试这个 - 这是一个数组公式,VBA其中将文本转换为Max函数的数字。
VBA
Max
Dim Highest As Double Highest = Evaluate("Max(H:H*1)")