Hi,
I am new to VBA and macros but starting investigating to see if it is possible to automate a data cleaning and analysis process that I have to do repeatedly for different excel files.
I was curious if it is possible to automate the following steps:
I don't know if it's possible, but even just automating some part of this process (such as delete all values below .01) would save me so much time. I would be very grateful to get whatever help can be offered since my computer skills are pretty bad. Thank you so much, once again I appreciate any help.
I am new to VBA and macros but starting investigating to see if it is possible to automate a data cleaning and analysis process that I have to do repeatedly for different excel files.
I was curious if it is possible to automate the following steps:
- Copy and paste the EDA data from the parent and child into the same excel file (Copying information from one data file into another-- this is something that I would probably have to do myself)
- Delete the second and third cells down that have 0 and 4 in their boxes (shift cells up)The first cell is a time stamp; convert it to a time using the following formula: =(A1/86400) + DATE(1970, 1, 1) + (-5/24)
- Once this formula is entered, change the cell to a “Time Cell” and you should get a time stamp
- Once you have a time stamp for both the child and parent, you want to line up their cells so that they are corresponding to the same part of the interaction. Whoever’s wristband started first will need their EDA data shifted down to align with the other partner (so that the same time is being captured for the partners) To determine how many cells to shift it down, do the following:
- Calculate the time difference between when each watch was turned on
- Convert that amount of time into seconds
- Multiple by the number of second by 4 to get the number of cells
- Shift the EDA data that had a earlier start time down by that many cells
- Now that the cells are aligned, the next step is to delete invalid data
- For both columns of data delete any value below .01
- Next, determine when the interaction took place (what data are we going to use).
- The end of the interaction should be 20 seconds from the end of the last wristband to be turned off (80 cells), so highlight the interaction beginning 80 cells up and continue for 1680 cells (7*60*4) to get 7 minutes of data
- With the 7 minutes of EDA for the parent and child, the next step is to bin the data into 2-second bins
- Be sure that before you bin the data, the very first row is the EDA data you’re using (otherwise the formula gets mad) Use the following formula for the parent and child data (separately): =AVERAGE(OFFSET(INDIRECT("B"&ROW(B1)*8-7),,,8))
- You should end up with 210 data points for each partner
I don't know if it's possible, but even just automating some part of this process (such as delete all values below .01) would save me so much time. I would be very grateful to get whatever help can be offered since my computer skills are pretty bad. Thank you so much, once again I appreciate any help.