Need help of you people

M

malik

Hope you all would be fine. I am making a Mess Management sheet for employees
but i have a problem that i make "P" for present in mess and "a" for absent
before anyone's name according to date i count all "p" and all "a" by COUNTIF
but the problem is how to make the value of 2p twice if some one has guest
with him when in geting total of all presents(p).
plz guide urgently
Thanks alot
 
S

Shane Devenshire

Hi,

if you only have p , a and 2p then
=COUNTIF(E1:E7,"p*")+COUNTIF(E1:E7,"2P")
or
=SUMPRODUCT(COUNTIF(E1:E7,{"p*","2p"}))
 
S

Shane Devenshire

Hi,

And here is a way to handle any number preceeding the P

=SUM(--IF(MID(E1:E7,2,1)="p",LEFT(E1:E7)))+COUNTIF(E1:E7,"p")

This is array entered, meaning you need to press Shift+Ctrl+Enter to enter it.
 
Top