Hi all,
So I am stuck on how to go about finishing this sheet I created. The logic of this sheet works like this:
Ok, I have wrote a section of code that is fairly long and includes many different cells. My question is this: Can I use the VBA code that I have written and push that code to another cell (just the logic of how it works)? I do not just want to simply copy and paste the logic into a cell, but I want the logic to be changed to look at the cells and reformat all the cells to match the new location.
Here is part of my VBA code below. It basically consist of cell D21 with a dropdown selection of 1,2, or 3. It merges and changes cells based on the selection made in the dropdown. However, I want to move the "logic" part of it to D28. So now D21, if not touched, would not be merged with any other cells. Now I go to the next (D28) option and maybe I want that to be a 3 slot breaker. It would use the logic to merge all three together and so on. Doing this the "old fashion" way, I would have to go through the entire code and change each cell to it's appropriate new location. This is EXTREMELY time consuming and leads to a lot of error. There HAS to be an easier way to achieve this. I want the code to change based on the new location. So this is why a simple copy and paste will not work. Can this be done?
When a "1" is selected in cell D22 it will show the following:

When a "2" is selected in cell D22 it will show the following:

When a "3" is selected in cell D22 it will show the following:

So I am stuck on how to go about finishing this sheet I created. The logic of this sheet works like this:
Ok, I have wrote a section of code that is fairly long and includes many different cells. My question is this: Can I use the VBA code that I have written and push that code to another cell (just the logic of how it works)? I do not just want to simply copy and paste the logic into a cell, but I want the logic to be changed to look at the cells and reformat all the cells to match the new location.
Here is part of my VBA code below. It basically consist of cell D21 with a dropdown selection of 1,2, or 3. It merges and changes cells based on the selection made in the dropdown. However, I want to move the "logic" part of it to D28. So now D21, if not touched, would not be merged with any other cells. Now I go to the next (D28) option and maybe I want that to be a 3 slot breaker. It would use the logic to merge all three together and so on. Doing this the "old fashion" way, I would have to go through the entire code and change each cell to it's appropriate new location. This is EXTREMELY time consuming and leads to a lot of error. There HAS to be an easier way to achieve this. I want the code to change based on the new location. So this is why a simple copy and paste will not work. Can this be done?
When a "1" is selected in cell D22 it will show the following:

When a "2" is selected in cell D22 it will show the following:

When a "3" is selected in cell D22 it will show the following:
