0

Excel 365 now supports dynamic arrays which are very similar in nature to those supported by most programming languages.

For instance, you can now type =A1:A5*2 in B2 and if the range A:1:A5 contains numeric values they will be multiplied in B1:B5.

My question is can one recognize the "end" of the data in column A and write the multiplication accordingly?

This is similar to what is explained for python here and for MATLAB here

Thank you for answering!

yair suari
  • 246
  • 2
  • 7

1 Answers1

1

Sure, if the values in Column A are static or placed by a non dynamic formula:

=A1:INDEX(A:A,MATCH(1E+99,A:A)) * 2

enter image description here

Or FILTER:

 =FILTER(A:A,ISNUMBER(A:A)) * 2

enter image description here

If the values in Column A are also filled with a dynamic array then we just need:

=A1# * 2

In A1 I put =SEQUENCE(6)

enter image description here

Scott Craner
  • 148,073
  • 10
  • 49
  • 81