I'm sure this has been discussed before but I can't seem to find any references to it.
I have data imported from an Excel spreadsheet that contains data on the campaigns an agent is enrolled in and looks essentially like this:
What I want it to look like is this:
I know I need to use a recordset with .AddNew along with an IF statement to check whether the value in each of the Campaign# column is Yes or No (write a new row using the column name if it's Yes, but not if No, etc.) but I just can't think how to get going with this, muchless the appropriate syntax. It's been a while since I've done any serious VBA coding.
Any tips on getting started would be greatly appreciated.
Thanks, all!
I have data imported from an Excel spreadsheet that contains data on the campaigns an agent is enrolled in and looks essentially like this:
Code:
AgentID Campaign1 Campaign2 Campaign3...
12345 Yes No Yes
33442 No No Yes
What I want it to look like is this:
Code:
AgentID EnrolledCpgns
12345 Campaign1
12345 Campaign3
33442 Campaign3
I know I need to use a recordset with .AddNew along with an IF statement to check whether the value in each of the Campaign# column is Yes or No (write a new row using the column name if it's Yes, but not if No, etc.) but I just can't think how to get going with this, muchless the appropriate syntax. It's been a while since I've done any serious VBA coding.
Any tips on getting started would be greatly appreciated.
Thanks, all!