gpt4 book ai didi

excel - Application.Evaluate 与 Activesheet.Evaluate

转载 作者:行者123 更新时间:2023-12-02 10:45:34 28 4
gpt4 key购买 nike

我正在读这个帖子 A custom find function并指出了这一点

有趣的结果。请注意,Evaluate 与 Application.Evaluate 相同,并且所需时间大约是 Activesheet.Evaluate 的两倍 – chris neilsen

是否应该始终使用 Activesheet.Evaluate 代替 Application.Evaluate

谢谢

最佳答案

我不知道你是否应该这样做,但看起来你可以。例如,这些都有效:

Activesheet.Evaluate("2")

Activesheet.Evaluate("Sheet1!A1+Sheet2!A1")

Activesheet.Evaluate("SUM([Book1]Sheet1!A1,[Book1]Sheet2!A1,[Book2]Sheet1!A1,[Book2]Sheet2!A1)")

第一种情况与工作表无关,它在“立即”窗口中返回正确的结果。

第二个引用两张表并且也返回正确的结果。第三个也是如此,它引用了两个不同的工作簿。

明显的警告是始终完全限定任何工作表或工作簿引用。

关于excel - Application.Evaluate 与 Activesheet.Evaluate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24343124/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com