View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Who can help the NYPD with an Excel formula?

I think it can be shortened even further to this...

=MIN(4,INT((MAX(0,B2-11)+(B2=20))/10))+C2+3*(D2="X")+
MATCH(E2&" ",{" ","E ","D ","C ","B ","A "},0)-1


I like your suggestion. Also, it will return an error for an illegal
entry in
column E, which I believe is preferable.


I agree about the benefit of returning the error as well. The only
modification I would suggest is to test Column A for an entry and return the
empty string if it is empty; that way, the OP can copy the formula down past
the end of the current data (anticipating future entries) without having it
display zeroes...

=MIN(4,INT((MAX(0,B2-11)+(B2=20))/10))+C2+3*(D2="X")+
MATCH(E2&" ",{" ","E ","D ","C ","B ","A "},0)-1

With that said, I kind of like Bernd's suggested formula (coupled with my
suggested modifications) a little better than either of our formulas.

--
Rick (MVP - Excel)