Thanks DonkeyOte for your help on the last one...

Two more (more complicated) outputs that I need.

I need the AVERAGE and STDEVof values in $C$1:$C$2793 that fit the criteria of having "a1" in $a$1:$a$2793 and where $c$1:$c$2793 is >50.