A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Try this formula:
=SUMIF(Sheet1!A2:A5,"AAA",OFFSET(Sheet1!A2:A5,,MATCH(Sheet1!A1,Sheet1!B1:Z1,0)))
Make sure that the data in your table are numbers and not text. In your example you have 09 and 07 that can be numbers formatted as "00", but it can also be text. If it is text the proposed formula will not work.
Hope this helps / Lars-Åke