Counting/Summing Arrays

R

RFJ

I have a worksheet of a simple fitness scheme comprising 5 main columns

A Peoples Names
B Their Training day
C Target Fitness
D Actual Fitness
eg

A B C D
John Monday 200 150
Sue Tuesday 300 320
etc


I want to do a count, by training day, of how many people are above/below
their target

Then I want to add up, again by training day, the total shortfalls of those
below target.

I can't get the array formula syntax right. Can SKS help me out.

TIA

Robin
 
B

Bob Phillips

1) =SUMPRODUCT(--(B1:B20="Monday"),--(C1:C20>D1:D20))

2) =SUMPRODUCT(--(B1:B20="Monday"),--(C1:C20>D1:D20),(C1:C20-D1:D20))
 
R

RFJ

Thanks Bob, works just as I want <BG>

I haven't seen the double negative before; for info can you tell me what it
does. ie :

--(B1:B20="Monday")

Tx

Robin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top