Need help with returning selectable array

mrblister

Board Regular
Joined
Nov 20, 2016
Messages
198
Office Version
  1. 2021
Platform
  1. Windows
Hello!
For the following formula, if posted in D1 as an array formula, would give the results in column D:
Excel Formula:
=TRANSPOSE(LINEST($B$1:$B$5,$A$1:$A$5^{1,2,3}))

ABCD
1138.25
250-68.3929
310179.3571
450-114.8
5100

I want to modify the formula so that I can enter the polynomial order in C1. Something like this following formula, but this gives me an error:

Excel Formula:
=TRANSPOSE(LINEST($B$1:$B$5,$A$1:$A$5^switch(C1,1,{1},2,{1,2},3,{1,2,3},4,{1,2,3,4},0)))

Can anyone assist?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Glad it's sorted & thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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