Are you saying that you want to SUM E11:E5000 where D11

500 = Medical but
you only want to add those values less than or equal to I16? Given what you
posted in your first post I would say that was impossible to guess.
=SUMPRODUCT(--(D11

5000="Medical"),--(E11:E5000<=I16),E11:E5000)
for values less than I16
=SUMPRODUCT(--(D11

5000="Medical"),--(E11:E5000<I16),E11:E5000)
greater than or equal to I16
=SUMPRODUCT(--(D11

5000="Medical"),--(E11:E5000>=I16),E11:E5000)
greater than
=SUMPRODUCT(--(D11

5000="Medical"),--(E11:E5000>I16),E11:E5000)
--
Regards,
Peo Sjoblom