Lookup return multiple values?

bkube01

New Member
Joined
Mar 31, 2006
Messages
14
Good morning!

I have a table like the one below that shows a document number and the hours it took to write the document. I'm trying to calculate the averages, medians, percentiles of this table by doc number. I'm guessing something like =AVERAGE(VLOOKUP($A35,$b$1:$b$15,2)) but I can't get the vlookup to return multiple values. Any ideas? Thanks!


Doc Number Hours
58 1.0
340 1.0
550 2.0
550 4.0
555 6.0
650 14.0
650 9.0
650 2.0
760 9.0
760 18.0
760 2.0
800 2.0
800 1.0
800 1.0
910 1.0
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Assuming range is A1:B16 then:

Code:
=AVERAGE(IF(B2:B16=1,A2:A16))

etc
which must be entered as an array formula (CTRL+SHFT+ENTR)
 

Watch MrExcel Video

Forum statistics

Threads
1,109,054
Messages
5,526,510
Members
409,705
Latest member
MB1984

This Week's Hot Topics

Top