How to use LINEST when data are in non-adjacent cells?

Special K

Board Regular
Joined
Jun 20, 2011
Messages
83
Office Version
  1. 2010
Platform
  1. Windows
I have the following worksheet:

FXAIX
162938
583
000
FSMDX
277
203518
452
FSSNX
000
123
304123
FSKAX (target)
142533
595
342
fundpct
FXAIX
FSMDX
FSSNX


The point of the spreadsheet is to use the LINEST function to determine what percentage of each of 3 mutual funds (FXAIX, FSMDX, FSSNX) best approximates a 4th fund (FSKAX). In other words, I am trying to find the least squares solution to the following overdetermined system of equations:

VBA Code:
16*a + 2*b + 0*c = 14
29*a + 7*b + 0*c = 25
38*a + 7*b + 0*c = 33

5*a + 20*b + 1*c = 5
8*a + 35*b + 2*c = 9
0*a + 5*b + 41*c = 4

0*a + 4*b + 30*c = 3
0*a + 5*b + 41*c = 4
0*a + 2*b + 23*c = 2

I have used LINEST successfully when the data is arranged in adjacent cells, but is it possible to use it in the example above where the matrix numbers are not in adjacent cells?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Bump - can anyone help with this?

I tried entering the following as an array formula into the blank cells next to FXAIX, FSMDX, and FSSNX but it gave a #REF! error:

Excel Formula:
={LINEST((A18:C18,A19:C19,A20:C20),(A2:C4,A7:C9,A12:C14),FALSE)}
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,967
Members
452,539
Latest member
delvey

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