try this

=IF(SUMPRODUCT(NOT(ISERROR(SEARCH("p",e200:e250,1)))*1)>0,5,6)

substitute what you want for a positive (found) result for the 5, and for a negative (not found) result for the 6