# Lookup return multiple values?

#### bkube01

##### New Member
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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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)

Success! Thank you very much!

Replies
1
Views
375
Replies
3
Views
262
Replies
3
Views
322
Replies
3
Views
433
Replies
1
Views
342

1,219,104
Messages
6,146,292
Members
450,685
Latest member
frederik00

### 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.

### Which adblocker are you using?

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

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