View Single Post
  #11   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 believe this formula in F2 will do what you asked...

=IF(A2="","",MIN(4,INT((MAX(0,B2-10))/10))+C2+3*(D2="X")+IF(E2="",0,70-CODE(UPPER(E2))))

The assumptions it works under is that Column E will only have the letters
A, B, C, D, E in it or the cell will be blank.

This formula can be copied down as needed. You can copy it down through
empty rows in anticipation of future entries if you want to.


I believe your formula is giving incorrect answers with regard to accident
counts "on the margin".

The OP specified:

20 to 30 accidents, it gets 1 point
31 to 40 accidents, it gets 2 points
41 to 50 accidents, it gets 3 points
51 or more accidents it gets 4 points.

Your formula seems to give one more point than indicated at 30, 40 and 50


Thanks... I just posted a correction. I had gotten thrown by the different
range size between 20-30 and the rest of the ranges.

--
Rick (MVP - Excel)