Using the AVERAGE function,
=AVERAGE(L5:M 12,[Book 1]Sheet 1! L5:M 12)
The above formula is to find the average of sheet 1 2 in this table L5:M 12 and file book1. If there are 24 files, write them down one by one. If every other cell area asking the price is the same, such as L5:M 12, it is best to put these 24 tables in different worksheets in a unified file, so that,
= average (Sheet 1:Sheet24! L5:M 12)