Hi,
You can use an array formula (ensure that you know how to enter these in Excel), though it's best practice not to reference whole rows/columns in these cases (I chose 1000 as an end reference - obviously amend to suit your needs):
=AVERAGE(IF((U2:U1000="Photo")*((D2:D1000="July 2013")+(D2:D1000="Aug 2013")),AI2:AI1000))
Regards
Bookmarks