tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,926
- Office Version
- 365
- 2019
- Platform
- Windows
Assume I have this data on my worksheet from cell A1 through to B6:
If In cell D1 I type:
and enter it "normally", I get #N/A.
However, if I enter it as an ARRAY formula, (using Ctrl+Shift+Enter), I get 1.
In VBA, if I write:
a returns 1.
So my question is:
1. Does using Evaluate ALWAYS execute the formula as an array, IF it is an array formula?
2. What if I wanted it NOT to execute as an array formula but as a "normal" formula?
Thanks
[/FONT]
[/FONT]
Rich (BB code):
[TABLE="width: 128"]
<colgroup><col width="64" style="width:48pt" span="2"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]1 [/TD]
[TD="width: 64"]a[/TD]
[/TR]
[TR]
[TD="align: right"]2 [/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD="align: right"]3 [/TD]
[TD]c[/TD]
[/TR]
</tbody>[/TABLE]
If In cell D1 I type:
Rich (BB code):
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=MATCH(1,(A1=A1:A3)*(B1=B1:B3),0)
and enter it "normally", I get #N/A.
However, if I enter it as an ARRAY formula, (using Ctrl+Shift+Enter), I get 1.
In VBA, if I write:
Rich (BB code):
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Dim a
a = Evaluate("=MATCH(1,(A1=A1:A3)*(B1=B1:B3),0)")
a returns 1.
So my question is:
1. Does using Evaluate ALWAYS execute the formula as an array, IF it is an array formula?
2. What if I wanted it NOT to execute as an array formula but as a "normal" formula?
Thanks
[/FONT]
[/FONT]