ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Referencing Literal Arrays (https://www.excelbanter.com/excel-worksheet-functions/27412-referencing-literal-arrays.html)

Vic Sowers

Referencing Literal Arrays
 
If A1 contains =SUM({1,2,3}) it displays 6 (good!), but
if A2 contains =SUM(B2) and B2 contains ={1,2,3} it displays 1 (bad...).

How can I get the reference to B2 in A2 to treat B2 as an array?

TIA





Aladin Akyurek

Vic Sowers wrote:
If A1 contains =SUM({1,2,3}) it displays 6 (good!), but
if A2 contains =SUM(B2) and B2 contains ={1,2,3} it displays 1 (bad...).

How can I get the reference to B2 in A2 to treat B2 as an array?

TIA





In B2 with

={1,2,3}

only the topleft item is available.

Not that it's the right thing to do, but if you enter in B2

{1,2,3}

without the = sign, you can have:

=SUM(EVAL(B2))

provided you have EVAL, for example, from the morefunc.xll add-in.




PC

Don't believe you can store an array in a single cell.

You can definitely store the array in a named formula

Insert/Name/Define

Give it a name and enter the array ={1,2,3}

HTH

PC


"Vic Sowers" wrote in message
...
If A1 contains =SUM({1,2,3}) it displays 6 (good!), but
if A2 contains =SUM(B2) and B2 contains ={1,2,3} it displays 1 (bad...).

How can I get the reference to B2 in A2 to treat B2 as an array?

TIA








All times are GMT +1. The time now is 04:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com