Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Excel question

  1. Oct 9, 2008 #1
    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?
     
  2. jcsd
  3. Oct 9, 2008 #2

    Redbelly98

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    I would try writing a macro to do this. Have you done any programming in VBA (the language of Excel and Word macros) yet?
     
  4. Oct 9, 2008 #3
    No I have never programmed in VBA. But if you say that it can be done using VBA I'll give it a try.
     
  5. Oct 9, 2008 #4

    Redbelly98

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    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.
     
  6. Oct 9, 2008 #5
    Yes, the names are sequential. Thanks for the suggestion. I am looking right now over a VBA tutorial.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Excel question
  1. Excel question! (Replies: 5)

  2. Excel - (Replies: 2)

Loading...