I have two columns
ColA with all 1s and 0s
ColB with values
I would like to calcualte the median of the rows in colB which have a 1 in ColA.
In the Example below I would like the answer to be 5, since that is the Median of 10, -6 and 5 (the three rows with a 1 in colA)
Example
ColA ColB
1 10
0 9
1 -6
1 5
0 6
0 7
0 8
ColA with all 1s and 0s
ColB with values
I would like to calcualte the median of the rows in colB which have a 1 in ColA.
In the Example below I would like the answer to be 5, since that is the Median of 10, -6 and 5 (the three rows with a 1 in colA)
Example
ColA ColB
1 10
0 9
1 -6
1 5
0 6
0 7
0 8