I was reading this thread A custom find function and this was stated
Interesting result. Note that Evaluate is same as Application.Evaluate and takes roughly twice as long as Activesheet.Evaluate – chris neilsen
Should one always use Activesheet.Evaluate
in place of Application.Evaluate
?
Thanks
I don't know if you should, but it looks like you can. For example these all work:
Activesheet.Evaluate("2")
Activesheet.Evaluate("Sheet1!A1+Sheet2!A1")
Activesheet.Evaluate("SUM([Book1]Sheet1!A1,[Book1]Sheet2!A1,[Book2]Sheet1!A1,[Book2]Sheet2!A1)")
The first case is worksheet-agnostic, and it returns the correct result in the Immediate window.
The second refers to two sheets and also returns the correct result. As does the third, which refers to two different workbooks.
The obvious caveat is to always fully qualify any worksheet or workbook references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With