Compare text cells

Closed
Frappy
Posts
1
Registration date
Thursday June 19, 2014
Status
Member
Last seen
June 19, 2014
- Jun 19, 2014 at 04:15 AM
Hello,

I need to compare text cell and return me column title- row 4
I have made this formulla

=IF(B24=N5:N19,N4,IF(B24=O5:O19,O4,IF(B24=P5:P19,P4,"")))

But it compares me only the values from row 5. When I put in B24 a value from N6 it retuns me ""
Can you tell me how I select entire column?