ShazzaBoom
New Member
- Joined
- Dec 1, 2015
- Messages
- 6
Hi
I am a newbie to <acronym title="visual basic for applications">VBA</acronym> coding in Excel and this one is just too complex for me to get my head around so reaching out to this great forum I have had so much success with
If you could help by providing some <acronym title="visual basic for applications">VBA</acronym> code that will do the following:
Have a button that when clicked would create multiple tabs for all the various possibilities in the 'Beverage' column. I'm guessing we need to build an array but as I said I am a bit of a newbie and don't really understand arrays
i.e. A tab for 'Beer' and would include CustA/D/E
All Customer data that has 'Beer' would be copied to the new 'Beer' tab
Loop for next Beverage Type[TABLE="class: cms_table_grid, width: 300, align: left"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Country[/TD]
[TD]Beverage[/TD]
[/TR]
[TR]
[TD]CustA[/TD]
[TD]England[/TD]
[TD]Beer; Wine[/TD]
[/TR]
[TR]
[TD]CustB<strike></strike>[/TD]
[TD]Canada[/TD]
[TD]Cider; Whisky; Wine[/TD]
[/TR]
[TR]
[TD]CustC<strike></strike>[/TD]
[TD]Australia[/TD]
[TD]Cider[/TD]
[/TR]
[TR]
[TD]CustD<strike></strike>[/TD]
[TD]India[/TD]
[TD]Beer[/TD]
[/TR]
[TR]
[TD]CustE<strike></strike>[/TD]
[TD]USA[/TD]
[TD]Beer; Whisky[/TD]
[/TR]
</tbody>[/TABLE]
Initially I started thinking this wouldn't be too hard, but is more and more complex the more I look at it, or is it?
Hopefully a smart cookie or two can help me out
Thanks in advance
ShazzaBoom
I am a newbie to <acronym title="visual basic for applications">VBA</acronym> coding in Excel and this one is just too complex for me to get my head around so reaching out to this great forum I have had so much success with
If you could help by providing some <acronym title="visual basic for applications">VBA</acronym> code that will do the following:
Have a button that when clicked would create multiple tabs for all the various possibilities in the 'Beverage' column. I'm guessing we need to build an array but as I said I am a bit of a newbie and don't really understand arrays
i.e. A tab for 'Beer' and would include CustA/D/E
All Customer data that has 'Beer' would be copied to the new 'Beer' tab
Loop for next Beverage Type[TABLE="class: cms_table_grid, width: 300, align: left"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Country[/TD]
[TD]Beverage[/TD]
[/TR]
[TR]
[TD]CustA[/TD]
[TD]England[/TD]
[TD]Beer; Wine[/TD]
[/TR]
[TR]
[TD]CustB<strike></strike>[/TD]
[TD]Canada[/TD]
[TD]Cider; Whisky; Wine[/TD]
[/TR]
[TR]
[TD]CustC<strike></strike>[/TD]
[TD]Australia[/TD]
[TD]Cider[/TD]
[/TR]
[TR]
[TD]CustD<strike></strike>[/TD]
[TD]India[/TD]
[TD]Beer[/TD]
[/TR]
[TR]
[TD]CustE<strike></strike>[/TD]
[TD]USA[/TD]
[TD]Beer; Whisky[/TD]
[/TR]
</tbody>[/TABLE]
Initially I started thinking this wouldn't be too hard, but is more and more complex the more I look at it, or is it?
Hopefully a smart cookie or two can help me out
Thanks in advance
ShazzaBoom