Average Data from Multiple Excel Log Files

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
antonantal
Messages
242
Reaction score
21
I have a lot of Excel spreadsheets which are actually log files from a test (so they all have the same structure) and I need to get the data (a number) from a specific cell (same cell) in each file and do their average.

Does anybody know an efficient method to do this?
 
Physics news on Phys.org
No I have never programmed in VBA. But if you say that it can be done using VBA I'll give it a try.
 
Redbelly98 said:
It's not hard to do if you've programmed in other languages.

It would help if the spreadsheet names are sequential in some fashion, for example:

log001.xls
log002.xls
log003.xls
etc. etc.

Then you can write a do-loop where the spreadsheet name increments each time through the loop.

Yes, the names are sequential. Thanks for the suggestion. I am looking right now over a VBA tutorial.