Hi all 

Have 2 sheets

Sheet 1:

      A               B 
1    REP             VALUE   
2   AMH0043                <----- Column B needs to return Median of the total
3   AJL0011                           for the given rep from column B sheet 2
4   BAW0009


Sheet 2:

      A               B 
1    REP             VALUE   
2   AMH0043       456          
3   AMH0043        79                    
4   AMH0043        800
5   AMH0043        290         
6   AMH0043        300                   
7   AJL0011         900
8   AJL0011         200     
9   AJL0011         40                 
10   BAW0009        100
11  BAW0009       1369


Thanks for your help all!

Jeremy