PDA

View Full Version : Desperately lost in VBA code



excilcius
12-29-2015, 05:47 PM
Hello everyone!

I am not a regular Excel/VBA user, but am tasked with doing a monumental script that I hope someone can help me with. I have spent hours going over VBA sites and Youtube videos, but not one single site has what I need, and I am not advanced enough to edit the existing code. Maybe someone would be kind enough to point me to tutorials, or perhaps even help me out :)

In exchange, I would be happy to help anyone get started training themselves using neurofeedback (Because I'm new, I can't post links, but check out the research summary paper by Corydon Hammond called "What is neurofeedback: an update")

I am an EEG biofeedback hobbyist who needs to write a script to do several things with EEG data:

1) Click a button to open up several tab-delimited EEG data text files that contain specific phrases in the file name. I would like all of the tab-delimited files imported into the same worksheet that's open, one after the other, and then I would like to rename various fields in each column depending on the name of the file being imported. The closest thing I've found is this:

Because I'm new, I can't post links, but you can search Google for: importing multiple files to single workbook. The script comes up first.

2) I would then like to import a worksheet (or perhaps just start off with it open) I've created into a new tab that that calculates Z-Scores in order to reject outlier EEG data that is too large, then recalculate the mean EEG amplitude score after rejecting the outliers.

I realize this is a tall order, and while I won't ever use VBA again, I can commit to learning this... just will be a big pain for such a small project. Any ideas where to go to learn the skills I need for this? I programmed a little bit in PERL ten years ago, so it's not completely foreign to me...just very overwhelming haha. :)

SamT
12-29-2015, 08:16 PM
You must to have, I believe, 5 posts before You can upload attachments using the Go Advanced page. Introduce your self in the Introductions (http://www.vbaexpress.com/forum/forumdisplay.php?93-Introductions) forum, make some posts in the Testing Area (http://www.vbaexpress.com/forum/forumdisplay.php?68-Testing-Area) Forum, etc.

We will need from you two or three very short copies of the data files, (first three or four lines only,) and a Workbook with a Worksheet showing exactly how you want the data from those three samples to appear.

The specific name "phrases" to use.

Only after we get all the data files imported into Excel should we start wok on the rest.

Are you dead set on using a button(s) for this? You can always use the Excel Menu Tools Macros to run the procedure(s). A Button could mean a dedicated Worksheet just for the button.

excilcius
12-30-2015, 04:54 AM
Thanks so much for your willingness to help. I don't need a button... just thought it would be easy to do. But if not, no big deal. I believe I can just use Alt-F8 to load a script instead? In the meantime, I will try to find some basic tutorials! :)