+ Reply to Thread
Results 1 to 9 of 9

Calculate stats from multiple csv files

  1. #1
    Registered User
    Join Date
    04-29-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Calculate stats from multiple csv files

    I work for a University in Michigan. We are starting to use a software title to deliver and administer tests/surveys. After the test is done the program will write 2 types of files; 1 is an html of all the computer names and their total score, the other is an individual .csv file which details Question number, Question Title, Total Points, and Points Scored. Is there a way to automate the creation of a document that uses all the .csv files to create stats?

    Example:
    (Suppose that each person has their own .csv file with this info)
    Person 1
    Question 1: 0 points
    Question 2: 1 point

    Person 2
    Question 1: 1 point
    Question 2: 1 point

    I am looking for a way to output that 50% of the people got Question 1 right, and 100% of the people got Question 2 right. Assuming that each question will be worth 1 point.

    Attached are 2 of the .csv files that the program spits out when the test is completed. Also please ignore that the first question was worth 4 points, in the future it should 1 point or 0 points.

    Please let me know if what I am asking is possible.

    Thanks
    ~Fletch
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-29-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate stats from multiple csv files

    Anyone? This seems like this would be easy for a avid Excel user

  3. #3
    Registered User
    Join Date
    06-06-2006
    Location
    English(UK)
    MS-Off Ver
    2019
    Posts
    93

    Re: Calculate stats from multiple csv files

    I have no clue about excel alone, but here is my idea:
    Use the copy command.
    Get all of your relevant CSV's in one directory, open a command prompt in that dir and type
    "copy *.csv combo.csv"
    The result will be a concatenated file of all your CSV's.
    For more options see this page: http://www.lagmonster.org/docs/DOS7/z-copy.html
    Then it is up to excel to process them.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate stats from multiple csv files

    I think martix makes a great suggestion. You can open the combo file in Excel and use a few formulas to summarize the results.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    04-29-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate stats from multiple csv files

    Quote Originally Posted by martix View Post
    I have no clue about excel alone, but here is my idea:
    Use the copy command.
    Get all of your relevant CSV's in one directory, open a command prompt in that dir and type
    "copy *.csv combo.csv"
    The result will be a concatenated file of all your CSV's.
    For more options see this page: http://www.lagmonster.org/docs/DOS7/z-copy.html
    Then it is up to excel to process them.
    Quote Originally Posted by shg View Post
    I think martix makes a great suggestion. You can open the combo file in Excel and use a few formulas to summarize the results.
    It may be possible, but I'm trying to figure out a way that would be easy to explain to someone so that they can do it. With this option I would have to copy the files into one file (as stated with your suggestions) then open the master one in Excel but would then have to manually select all the points scored for question 1 and tell them to add together then do the same for question 2 and so on. This would be very tedious (and thus not what I'm looking for) when there is 20+ questions and 30+ result files...

    Your suggestion would work much better if it put all of the scores horizontally instead the copy command joins all the .csv files vertically.

  6. #6
    Registered User
    Join Date
    04-21-2009
    Location
    Ecuador
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: Calculate stats from multiple csv files

    Hi Fletch,

    I attach the solution for you.

    The file is ready to receive your data, just open each csv file in excel and separate it into columns with Text to Columns Command, then copy and paste it in B2.

    Copy and paste formulas down until your last record

    The process in summary:

    You can do it with the COUNTIF function.

    Count the number of Questions 1 with Scored 0 and divide by the number of questions 1... and this way with each question.

    Each question has two conditions:
    Question 1: Scored 0 = 10 and Question 1: Scored 1 = 11
    Question 2: Scored 0 = 20 and Question 1: Scored 1 = 21

    Use concatenate function to turn those two conditions into one: 10, 11, 20, 21 ...

    Done

    I hope this help you

    You can know more about COUNTIF function and examples in: http://www.excel-spreadsheet-authors.com/countif.html
    Attached Files Attached Files
    Last edited by John_Franco; 04-30-2009 at 03:12 PM. Reason: Forget details
    John Franco
    https://www.excelgurusacademy.com/

  7. #7
    Registered User
    Join Date
    06-06-2006
    Location
    English(UK)
    MS-Off Ver
    2019
    Posts
    93

    Re: Calculate stats from multiple csv files

    Nvm... John_Franco's solution is way better that what I thought of. I just didn't see his post.
    To addapt his idea to the whole lot you'll have to adjust the ranges in the table and maybe use an array formula for the Auxiliary Field(the ones you enter with Ctrl+Shift+Enter).
    Last edited by martix; 04-30-2009 at 03:19 PM.

  8. #8
    Registered User
    Join Date
    04-21-2009
    Location
    Ecuador
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: Calculate stats from multiple csv files

    Hi Fletch,

    The attachment is ready to receive your data, just open each csv file in excel and separate it into columns with Text to Columns Command, then copy and paste it in B2.

    Copy and paste formulas down until your last record

    Done

  9. #9
    Registered User
    Join Date
    04-29-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate stats from multiple csv files

    Quote Originally Posted by John_Franco View Post
    Hi Fletch,

    I attach the solution for you.

    The file is ready to receive your data, just open each csv file in excel and separate it into columns with Text to Columns Command, then copy and paste it in B2.

    Copy and paste formulas down until your last record

    The process in summary:

    You can do it with the COUNTIF function.

    Count the number of Questions 1 with Scored 0 and divide by the number of questions 1... and this way with each question.

    Each question has two conditions:
    Question 1: Scored 0 = 10 and Question 1: Scored 1 = 11
    Question 2: Scored 0 = 20 and Question 1: Scored 1 = 21

    Use concatenate function to turn those two conditions into one: 10, 11, 20, 21 ...

    Done

    I hope this help you

    You can know more about COUNTIF function and examples in: http://www.excel-spreadsheet-authors.com/countif.html

    Wow, thanks I will give it a try, but I am out of the office now, but I will report back on Monday how it worked!

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1