Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to multiply, row-by-row, two columns in an Excel sheet (in order to take the median of the resulting column).

1  3
2  5
4  2

Should become

3
10
8

How can I do that in a formula (i.e. without creating a separate column with the multiplication result)?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You want an array formula...

Assuming your data starts in A1, you can type:

=MEDIAN(A1:A3*B1:B3)

and the press Ctrl + Shift + Enter to enter it into the cell as an array formula. If you do it correctly, you'll see the formula enclosed in curly braces by Excel.

share|improve this answer
    
Thanks a lot! I didn't know you had t use ctrl+shift+enter for that. –  Jonas Jun 22 '10 at 11:10
add comment

In excel, you can multiply cells together in the median formula to get the result.

The median of {3, 10, 8} = 8 in excel you can use Median(A1*B1, A2*B2, A3*B3) to get the same result. Provided the first number "1" starts on A1.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.