Jon von der Heyden
MrExcel MVP, Moderator
- Joined
- Apr 6, 2004
- Messages
- 10,910
- Office Version
- 365
- Platform
- Windows
Hi
Say I have the following formula:
=SUM(SUMIF(A2:A10,{"a","b"},B2:B10))
This will yield the result of all values in B2:B10 where the corresponding value in column A is either "a" or "b". No CSE required because of the inline array constant.
So lets say we place "a" and "b" in D1:D2 and use:
=SUM(SUMIF(A2:A10,D1:D2,B2:B10))
So say I do not commit with CSE. It will yield the result adjacent to "b", not "a". Why?
In other cases where an array is passed and not computed as an array Excel tends to yield the 1st array item. This picks up the last.
I realise this is academic but curious to know why??
Say I have the following formula:
=SUM(SUMIF(A2:A10,{"a","b"},B2:B10))
This will yield the result of all values in B2:B10 where the corresponding value in column A is either "a" or "b". No CSE required because of the inline array constant.
So lets say we place "a" and "b" in D1:D2 and use:
=SUM(SUMIF(A2:A10,D1:D2,B2:B10))
So say I do not commit with CSE. It will yield the result adjacent to "b", not "a". Why?
In other cases where an array is passed and not computed as an array Excel tends to yield the 1st array item. This picks up the last.
I realise this is academic but curious to know why??