Return value pairs based on first row and column

-1

Gnumeric has a nice tool for calculating correlations, but is limited in terms of specifying your output. It looks like this, Figure 8-7 :

Correlations | pressure | distance | height
pressure     |        1 |          |
distance     | 0.9841073|        1 |
height       | 0.7633996| 0.7239509|      1

I would like to generate pairs like this:

pressure pressure  1
pressure distance  -
pressure height    -
distance pressure  0.9841073
distance distance  1
distance height    -
height pressure    0.7633996
height distance    0.7239509
height height      1

I'm fine with 1's and blanks, but it would be nice if I could avoid them. It doesn't have to be within a spreadsheet.

anon8723879278

Posted 2018-04-02T15:44:38.220

Reputation: 13

Answers

1

This is a pretty straightforward Index/Match:

=INDEX($B$2:$D$4,MATCH($A6,$A$2:$A$4,0),MATCH($B6,$B$1:$D$1,0))

Assuming your data is like the below:

enter image description here

BruceWayne

Posted 2018-04-02T15:44:38.220

Reputation: 2 508

This doesn't work in Excel 2010 or Gnumeric (I know to substitute commas with semicolons with it). – anon8723879278 – 2018-04-03T11:44:26.293

@anon8723879278 - This should work in Excel 2010...what happens when you try to use it? – BruceWayne – 2018-04-03T14:34:57.977

"Circular reference warning" – anon8723879278 – 2018-04-03T14:43:15.300

@anon8723879278 - How is your worksheet setup? That warning means you're referencing the cell the formula is actually in. In my example, I put the formula in C6. You will likely need to adjust yours. This formula will work in Excel 2010, it's just you need to tweak the ranges to match your data. – BruceWayne – 2018-04-03T14:55:07.147

It works when I input the variable names in preceding cells. Part of my question was about automatically generating these "pressure pressure, pressure distance" pairs. I apologise for not making that clear enough. – anon8723879278 – 2018-04-03T15:13:37.997

@anon8723879278 - Oh I see. That'd be a separate question, the one you asked here was primarily how to get the values out of the table. – BruceWayne – 2018-04-03T15:21:36.807