Hi everyone,
I have 2 columns, one contains a number and the other contains either 1 or 0. I want to calculate the median of all the values in the first column for which the value in the second column is 1.
I have tried using the Lookup function and I cannot get it to correctly identify even one of the values.
Any help is appreciated, thanks
Last edited by lady_Jane; 07-05-2011 at 11:54 AM.
Try: =MEDIAN(IF(B1:B1000=1,A1:A1000))
Confirmed with Ctrl+Shift+Enter rather than just Enter as it's an array formula.
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
That worked perfectly! Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks