Try this one:
=AVERAGEIF(A1:A100,"AAHEIM",B1:B100)
where A1:A100
is range of your names and B1:B100
- corresponding values in col1
. The same formula for col2
.
If you need avarege of both columns col1
and col2
at the same time, use (where B1:C100
address of columns col1
and col2
):
=AVERAGE(IF((A1:A100="AAHEIM")*(B1:C100<>""),B1:C100))
and press CTRL+SHIFT+ENTER to evaluate it.
UPD Follow up from comments:
for conditional MAX
use this one:
=MAX(IF(A1:A100="AAHEIM",B1:B100))
with array entry (CTRL+SHIFT+ENTER).