Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this challenging assignment, you will create a VBA subroutine that will iterate through a set of files to bring in data from those files
In this challenging assignment, you will create a VBA subroutine that will iterate through a set of files to bring in data from those files into a central spreadsheet. In the Week folder there is another folder Ralphie Reactorwith files representing the output of the "Ralphie Reactor" named for the mascot here at CU Boulder! Within this folder are csv files, which are generated by a hypothetical bioreactor. You are in charge of quality assurance and wish for the temperature of the bioreactor to remain around deg C the pH to stay around and the dissolved oxygen dO concentration to remain around The Ralphie Reactor automatically outputs the temperature, pH and dO concentration every hour, hours a day, and places the data into an hourly summary file. For example, here is what one might look like, at : amin the RalphieReactorcsv file:
As head of quality assurance, it is your job to summarize and analyze the results perhaps in graphical form once a day. Therefore, you set up a central file in which every morning you can import and analyze the data in those hourly summary files rather than doing this manually copyingpasting from those files each day
You wish to automate the import of these hourly summary files into a main file the Assignment STARTER.xlsm file The data in cells B:Bcolumn in each hourly summary file should be placed rowwise into the Assignment STARTER.xlsm file, as shown below:
This is the result after the subroutine has been executed.
Please see the Assignment screencast for a detailed demonstration of what you are trying to create in this assignment.
HINT #: To enable the user to input a range of cells using an input box, see the screencast "How to select a range using the input box method". You can adapt the code to enable the user in your subroutine to select cells B:Bas requested by the grading file of the sheets that you import.
HINT #: If you are following the method I used above in HINT # in the screencast referenced, UserRange is a range, and you need to convert that to a string in order to use later in your subroutine. You can use something like ImportRange UserRange.Address, where ImportRange is Dim'med as a String. Later on when you are iterating through your workbooks, you can refer to that range of each workbook by using RangeImportRange be sure to use the full reference, eg aWB.SheetsRangeImportRangeCells
I have already placed three plots into this workbook, one each for temperature column B pH column C and dO concentration column D Therefore, this makes it easy each day to import the files and quickly analyze the data for any problems. It is likely that the time scales will be converted to decimals fraction of a day but that's okay.
What you need to do is create a properly working file that imports the data in the hourly summary files into your main file.
Helpful hint: To select multiple files in a folder, you can click on a file and hold down the Ctrl key while selecting additional files. Or Shiftclick will select all files within two files. Better yet, click on one file in a folder then Ctrla to select all files in that folder!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started