ThePianoman
New Member
- Joined
- Mar 15, 2011
- Messages
- 15
I'm looking for a bit of help for a pretty straightforward small project. I'm fairly familiar with all the basic functions of excel, VLOOKUP, pivot tables, etc., but clueless when it comes to VBA. I realize it can probably be done manually pretty easily, or using helper columns or similar, but I will need to perform the function several times and make it easy for other research study sites to use. So automated with VBA is the way I want to go. I'm willing to donate a small fee to whoever can work with me on this- you guys are the experts.
Here's a brief rundown:
<tbody>
</tbody>
<tbody>
</tbody>
Thanks in advance for your help.
Here's a brief rundown:
- I will periodically export a dataset from a research study database, in excel format. It will look something like this (with exactly this many columns, but potentially many more rows of data):
A | B | C | D | E | F | G | H | |||||||||
1 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | ||||||||
2 | 11111111 | 0 | 1 | 0 | 0 | 1 | 1 | 89 | ||||||||
3 | 22222222 | 3 | 2 | 2 | 1 | 3 | 4 | 55 | ||||||||
4 | 33333333 | 1 | 2 | 1 | 1 | 0 | 3 | 67 | ||||||||
5 | 44444444 | 1 | 1 | 1 | 1 | 4 | 1 | 42 | ||||||||
6 | 55555555 | 0 | 0 | 1 | 2 | 2 | 2 | 25 | ||||||||
7 | 66666666 | 3 | 1 | 2 | 1 | 3 | 4 | 67 | ||||||||
8 | 77777777 | 4 | 1 | 3 | 3 | 2 | 1 | 84 | ||||||||
9 | 88888888 | 1 | 4 | 3 | 2 | 2 | 1 | 77 |
<tbody>
</tbody>
- The data (B2:H9) needs to have "#F4_[column header in row 1]_" appended to it so that it will look exactly like this:
A | B | C | D | E | F | G | H | |||||||||
1 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | ||||||||
2 | 11111111 | #F4_ffi_shrinking_score_0 | #F4_ffi_gripstrength_score_1 | #F4_ffi_slowwalking_score_0 | #F4_ffi_lowactivity_score_0 | #F4_ffi_fr_1 | #F4_cfs_cfsscore_1 | #F4_rai_score_total_89 | ||||||||
3 | 22222222 | #F4_ffi_shrinking_score_3 | #F4_ffi_gripstrength_score_2 | #F4_ffi_slowwalking_score_2 | #F4_ffi_lowactivity_score_1 | #F4_ffi_fr_3 | #F4_cfs_cfsscore_4 | #F4_rai_score_total_55 | ||||||||
4 | 33333333 | #F4_ffi_shrinking_score_1 | #F4_ffi_gripstrength_score_2 | #F4_ffi_slowwalking_score_1 | #F4_ffi_lowactivity_score_1 | #F4_ffi_fr_0 | #F4_cfs_cfsscore_3 | #F4_rai_score_total_67 | ||||||||
5 | 44444444 | #F4_ffi_shrinking_score_1 | #F4_ffi_gripstrength_score_1 | #F4_ffi_slowwalking_score_1 | #F4_ffi_lowactivity_score_1 | #F4_ffi_fr_4 | #F4_cfs_cfsscore_1 | #F4_rai_score_total_42 | ||||||||
6 | 55555555 | #F4_ffi_shrinking_score_0 | #F4_ffi_gripstrength_score_0 | #F4_ffi_slowwalking_score_1 | #F4_ffi_lowactivity_score_2 | #F4_ffi_fr_2 | #F4_cfs_cfsscore_2 | #F4_rai_score_total_25 | ||||||||
7 | 66666666 | #F4_ffi_shrinking_score_3 | #F4_ffi_gripstrength_score_1 | #F4_ffi_slowwalking_score_2 | #F4_ffi_lowactivity_score_1 | #F4_ffi_fr_3 | #F4_cfs_cfsscore_4 | #F4_rai_score_total_67 | ||||||||
8 | 77777777 | #F4_ffi_shrinking_score_4 | #F4_ffi_gripstrength_score_1 | #F4_ffi_slowwalking_score_3 | #F4_ffi_lowactivity_score_3 | #F4_ffi_fr_2 | #F4_cfs_cfsscore_1 | #F4_rai_score_total_84 | ||||||||
9 | 88888888 | #F4_ffi_shrinking_score_1 | #F4_ffi_gripstrength_score_4 | #F4_ffi_slowwalking_score_3 | #F4_ffi_lowactivity_score_2 | #F4_ffi_fr_2 | #F4_cfs_cfsscore_1 | #F4_rai_score_total_77 |
<tbody>
</tbody>
- The dataset could include up to 1500 rows. Preferably I would like the VBA function to be initiated with a button. So it would work like this:
- Export the data to excel.
- Copy/Paste data into the macro worksheet
- Click the button to convert/append the data
- Click another button to create a new workbook (regular excel file), and copy the converted data into it.
Thanks in advance for your help.