I need your help for writing VBA code for the following purpose:
1) I have certain recipe; say about 10 of them
2) Each of them run a few lines, one after another. I am putting them in
distinct blocks, duly separated from each other by a few rows. Within
the block the rows come one after another without any blank rows in between
3) I define name for each block as say, recipe1, recipe2, recipe3 etc.
upto recipe10
4) The above blocks are in one sheet.
5) In another sheet, I want a block my choice to be copied, just by
giving the name of the block. Say, in A1 I will give the name "recipe1".
I realise the copying action has to be triggered. So, I select B1 and
invoke a macro.
6)The code of the macro should be such that it should reference/read the
name given in A1, select the block defined by this name specified in
A1(which is located in another sheet in the same workbook), copy& paste
it in B1 (i.e., Starting from B1 downwards to as many number of rows as
required in that named block)
7)What is the VBA code for carrying out the above macro/function ?
8)Next time, if I change the A1 content to, say, "recipe3", select B1
and invoke the macro/function, the content of the block named as
"recipe3" should get pasted in the rows B1 downward.
8)Is there any other better way to achieve the same results .
I request the experts in this group to advise the code.