Creating a dynamic formula to create an array constant

akshaythakker

New Member
Joined
Aug 31, 2016
Messages
6
Hello All:

I am looking for a way to create a dynamic array constant which has the value of {1,1,1;2,2,0;3,0,0} in column 3 and {1,1,1,1;2,2,2,0;3,3,0,0;4,0,0,0} in column 4.. and so on and so forth

This is where I have reached so far:
I was able to figure out that an array formula =CHOOSE(TRANSPOSE(A1:C1),{1,1,1},{2,2,0},{3,0,0}) where A1=1,B1=2,C1=3 gives me the solution and =A1*--(A1:A3<D1) gives me the value of {1,1,1}.. but when I try combining the above two into a single forumla as =CHOOSE(TRANSPOSE(A1:C1),A1:C1*--(OFFSET(A1:C1,0,0,1,C1)<D1)).. i am returned the value of {1,2,3;#VALUE!,#VALUE!,#VALUE!;#VALUE!,#VALUE!,#VALUE!}....

I cant seem to figure out how to get this to work or some other way to get the constant {1,1,1;2,2,0;3,0,0}.

Please do help.

Thanks
Akshay
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
for some reason a par of my post got deleted. here is the paragraph again

This is where I have reached so far:

<d1) gives="" me="" the="" value="" of="" {1,1,1}..="" but="" when="" i="" try="" combining="" above="" two="" into="" a="" single="" forumla="" as="CHOOSE(TRANSPOSE(A1:C1),A1:C1*--(OFFSET(A1:C1,0,0,1,C1)<D1)).." am="" returned="" {1,2,3;#value!,#value!,#value!;#value!,#value!,#value!}....<="" html=""></d1)>I was able to figure out that an array formula
Code:
=CHOOSE(TRANSPOSE(A1:C1),{1,1,1},{2,2,0},{3,0,0})
where A1=1,B1=2,C1=3 gives me the solution and
Code:
=A1*--(A1:A3<D1)
gives me the value of {1,1,1}.. but when I try combining the above two into a single forumla as
Code:
=CHOOSE(TRANSPOSE(A1:C1),A1:C1*--(OFFSET(A1:C1,0,0,1,C1)<D1))
.. i am returned the value of {1,2,3;#VALUE!,#VALUE!,#VALUE!;#VALUE!,#VALUE!,#VALUE!}....
<d1)[ code]="" gives="" me="" the="" value="" of="" {1,1,1}..="" but="" when="" i="" try="" combining="" above="" two="" into="" a="" single="" forumla="" as=""
Code:
="CHOOSE(TRANSPOSE(A1:C1),A1:C1*--(OFFSET(A1:C1,0,0,1,C1)<D1))
.." am="" returned="" {1,2,3;#value!,#value!,#value!;#value!,#value!,#value!}....
<d1) gives="" me="" the="" value="" of="" {1,1,1}..="" but="" when="" i="" try="" combining="" above="" two="" into="" a="" single="" formula="" as="CHOOSE(TRANSPOSE(A1:C1),A1:C1*--(OFFSET(A1:C1,0,0,1,C1)<D1)).." am="" returned="" {1,2,3;#value!,#value!,#value!;#value!,#value!,#value!}....<="" html=""></d1)></d1)[>
 
Upvote 0

Forum statistics

Threads
1,223,244
Messages
6,170,976
Members
452,372
Latest member
Natalie18

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top