jimmisavage
Board Regular
- Joined
- Jun 28, 2017
- Messages
- 130
Good morning all,
I seem to have stumped myself on a bit of VBA coding and was hoping someone might fancy a challenge!
I have a tab call 'MasterSheet' which is fed by a userform. I need to be able to transfer snippets of rows into different sheets; which my formulas run off.
In MasterSheet, cell AV there will be an input of either "Breakfast" "lunch" "Dinner" or "Snack". The same options are also in Cell AW with the inclusion of " " (because some food might be used for breakfast or snack for instance).
So I will need a macro that will copy some of that row to another sheet and some other cells in that row to another sheet again. Lets start with Snacks.
When "Snack" is entered in either row AV or AW i need the macro to copy columns A:U of that row into a sheet called "SnacksSheet". I then need to copy rows A & V:AA from "MasterSheet" to a sheet called "Snacks" (in both instances I would like to populate column A onwards so there are no black cells (such as B-U).
I need a macro that will do this to all food groups (Breakfast, Lunch, Dinner and Snacks - sheet naming conventions are the same), but not to duplicate (so maybe we need an indicator in call AX to show its already moved that line?). Ideally this would run straight after the macro I used to populate from the userform.
Oh heck, I hope this makes some sense!
Thanks in advance
Stuart
I seem to have stumped myself on a bit of VBA coding and was hoping someone might fancy a challenge!
I have a tab call 'MasterSheet' which is fed by a userform. I need to be able to transfer snippets of rows into different sheets; which my formulas run off.
In MasterSheet, cell AV there will be an input of either "Breakfast" "lunch" "Dinner" or "Snack". The same options are also in Cell AW with the inclusion of " " (because some food might be used for breakfast or snack for instance).
So I will need a macro that will copy some of that row to another sheet and some other cells in that row to another sheet again. Lets start with Snacks.
When "Snack" is entered in either row AV or AW i need the macro to copy columns A:U of that row into a sheet called "SnacksSheet". I then need to copy rows A & V:AA from "MasterSheet" to a sheet called "Snacks" (in both instances I would like to populate column A onwards so there are no black cells (such as B-U).
I need a macro that will do this to all food groups (Breakfast, Lunch, Dinner and Snacks - sheet naming conventions are the same), but not to duplicate (so maybe we need an indicator in call AX to show its already moved that line?). Ideally this would run straight after the macro I used to populate from the userform.
Oh heck, I hope this makes some sense!
Thanks in advance
Stuart