Average values from the same cell across multiple Excel log files

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
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
I would try writing a macro to do this. Have you done any programming in VBA (the language of Excel and Word macros) yet?
 
No I have never programmed in VBA. But if you say that it can be done using VBA I'll give it a try.
 
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.
 
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.