LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 1
Default Slope-and Array Formula Help

Im in need of help regarding producing an array formula for a kind of SlopeAnd function. I'm trying to work out an automated historical Beta using the slope function, but i need it to calculate beta for each previous historical year (starting from 2006, all the way to 2010) and have it automated via a formula without my input after i put in the formula so that when i paste in the close prices the results appear automatically. I can paste the company share prices and ftse close prices into my sheet and it automatically works out both % change columns (company % changes being y array, ftse close prices being x array for slope). the trouble im having is automating (via a formula) slope depending on the year. 2010 will be made of 2006-2010 % changes. 2009 will be made up of 2006-2009 % changes. 2008 will be made up of 2006-2008 % changes etc. so for example, if im tryin to work out 2009, i need to tell excel to slope and then only use % changes for 2006, 2007, 2008 and 2009 only. above my data i have headed columns with the year numbers 2006-2010 to reference against. iv tried an array formula for 2009 but its not working:

Formula description:
(C1 equalling "2006, D1 equalling "2007", E1 equalling "2008" etc) (E4:E237 is the year of the weekly close price, eg 2006, likewise G4:G237 is also the year of the weekly close price but for ftse, these are exactly the same as E4:E237)(F4:F237 is the company % change (y arrau), and H4:H237 is the ftse % change (x array)):

FORMULA:
{=SLOPE((IF(AND(E4:E237=C1,E4:E237=D1,E4:E237=E1,E 4:E237=F1)=FALSE,F4:F237)),(IF(AND(G4:G237=C1,G4:G 237=D1,G4:G237=E1,G4:G237=F1)=FALSE,H4:H237)))}

alternatively, iv tried using * instead of the "and" function, but its still not returning the correct values. this is what i tried for the same year (2009):

=SLOPE(IF(((E4:E237=C1)=FALSE)*((E4:E237=D1)=FALSE )*((E4:E237=E1)=FALSE)*((E4:E237=F1)=FALSE),F4:F23 7),IF(((G4:G237=C1)=FALSE)*((G4:G237=D1)=FALSE)*(( G4:G237=E1)=FALSE)*((G4:G237=F1)=FALSE),H4:H237))

iv been altering the formulas for 2 hours now and still cant get it to return the correct figures, anyone able to help please???
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
slope? John Excel Worksheet Functions 1 March 12th 10 04:42 AM
Array formula SUMIF with 2D sum_range array Rich_84 Excel Worksheet Functions 3 April 3rd 09 10:46 PM
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Find specific value in array of array formula DzednConfsd Excel Worksheet Functions 2 January 13th 09 06:19 AM
How to add slope formula to graph jessrand Charts and Charting in Excel 1 May 30th 06 12:55 AM


All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"