Zend certified PHP/Magento developer

Calculate Median If a range contains one of the values from another range

I would like to calculate Median of values in a column F, if the value in Column I contains one of the NUMBERS in a range (N5:N10).

Currently I am calculating using the following formula :

=MEDIAN(
      IF(
         OR(I4:I466 = N5, I4:I466 = N6,  I4:I466 = N7 ),
         F4:F466)
   )

Can anyone help me to replace the OR statement in the formula I am using ?

Thanks

Rahul