Forum

Notifications
Clear all

How to return a dynamic column array in numbers?

9 Posts
3 Users
0 Reactions
83 Views
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

I want to build a array function in Excel 2019 and I want to use some array constant like {0;1;2;3;...}, this will always starting from 0 but end with different number. The number will be calculated from other cell, let's suppose say D5, How to achieve this?

 
Posted : 07/06/2021 12:20 am
(@purfleet)
Posts: 412
Reputable Member
 

Please add an example workbook so the question is clear and we dont have to recreate the data

 
Posted : 07/06/2021 12:33 am
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Ok, Thanks. Please see attached file. Please focus on the formula for Calendar of June.

The array formula is using "StartDate+{0;1;..;7}*WeekDays" to calculat, I want to modify formula to 0:N11. Since sometimes N11 will be 6, 7, or 8. so that I can get a dynamic calculation.

 
Posted : 07/06/2021 9:07 am
(@debaser)
Posts: 837
Member Moderator
 

You could use:

 

ROW(INDIRECT("1:"&N11+1))-1

 
Posted : 08/06/2021 7:48 am
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Thanks a lot. I thought this way but just stuck by starting number with 0.

 

By the way, If I want to use for {1, 2, 3, ...} for this, is this same way or others?

 
Posted : 09/06/2021 11:55 am
(@debaser)
Posts: 837
Member Moderator
 

If you want it to start at 1, just remove the -1 at the end and use N11 rather than N11+1

 
Posted : 10/06/2021 5:02 am
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Thanks. So whatever will it apply for {1;2;...;n} or {1, 2, ...,n}, can use same methodology?

 
Posted : 10/06/2021 11:24 am
(@debaser)
Posts: 837
Member Moderator
 

If you need to change orientation, you can wrap it in a TRANSPOSE function.

 
Posted : 11/06/2021 4:56 am
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Thanks a lot.

 
Posted : 11/06/2021 12:03 pm
Share: