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
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

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)
 

Forum statistics

Threads
1,141,144
Messages
5,704,544
Members
421,354
Latest member
Canary99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top