I am trying to write a formula in excel. I have a summary sheet that has equipment numbers in one column and sheet reference values in a row. I also have multiple sheets that have names equal to the values in the row mentioned. I want to use the indirect function to sum the range in column G of a specific sheet (based on a sheet reference) if the cell in column E of the same specific sheet matches the equipment number in my summary sheet. I have tried a bunch of different formulas but they all give me a reference error. Here is my latest version of the formula:
=SUMIFS(INDIRECT("'" & $O$2 & "'!G2:G500"), INDIRECT("'" & $O$2 & "'!E2:E500"), B8)
Here are some pictures of my spreadsheet:
Summary:

'13' Sheet:

Any help is appreciated. Thank you
=SUMIFS(INDIRECT("'" & $O$2 & "'!G2:G500"), INDIRECT("'" & $O$2 & "'!E2:E500"), B8)
Here are some pictures of my spreadsheet:
Summary:

'13' Sheet:

Any help is appreciated. Thank you