Can someone tell me what this formula is doing?
=CHOOSE(SIGN((ROWS(A$2:A15)-COLUMNS($B15:B15)))+2,"",1,PEARSON(INDEX(Sheet1!$63:$314,0,MATCH(B$1,Sheet1!$17:$17,0)+1),INDEX(Sheet1!$63:$314,0,MATCH($A15,Sheet1!$17:$17,0)+1)))
Thank you,
MofB
Can someone tell me what this formula is doing?
=CHOOSE(SIGN((ROWS(A$2:A15)-COLUMNS($B15:B15)))+2,"",1,PEARSON(INDEX(Sheet1!$63:$314,0,MATCH(B$1,Sheet1!$17:$17,0)+1),INDEX(Sheet1!$63:$314,0,MATCH($A15,Sheet1!$17:$17,0)+1)))
Thank you,
MofB
Last edited by MarginofBuffett; 11-15-2010 at 05:07 PM. Reason: [SOLVED]
context: http://www.excelforum.com/excel-gene...on-matrix.html
The ROWS-COLUMNS result of every given cell within the matrix determines whether or not a calculation needs to be performed in the first instance - and - if so - which calculation...
If Rows < Columns [<0] then no calculation
If Rows = Columns [=0] then result will be 1 (no calc needed per se)
If Rows > Columns [>0] then need to perform the PEARSON calculation
We use CHOOSE in conjunction with SIGN to action the above.
We know the SIGN of our ROWS-COLUMNS calculation will be either -1 (negative), 0 (0) or 1 (positive)
Obviously we can't use negative values for the index_num value in our CHOOSE calculation so we add 2 to the SIGN result such that the values become 1, 2 & 3 respectively.
The appropriate function is then actioned based on the now revised index_num, ie 1 returns Null, 2 returns 1 and 3 returns the PEARSON calc.
The PEARSON calculation in itself uses INDEX with MATCH twice over to create the appropriate array ranges.
In both cases all rows are returned from rows $63:$314 - the column used for each array is determined by Matching B$1 / $A15 in row 17 respectively.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks