Hi,

I have developed the following function to determine an observation's rank
within that observation's respective category (culumn C contains the
category; the observation's rank is based on the value in column O):

=SUMPRODUCT(--($C$5:$C$69=$C5),--($O$5:$O$69<$O5))+1

Now, I have third binary variable (true/false) in column D. I would like to
only rank the observations that have a corresponding true value in column D
and return 0, blank or whatever if the value in column D is false. Do you
have any ideas?

Thanks,
Henrik