Hi all,
I need help with an excel macro. I have only started to use macros and as a result have a very basic knowledge and understanding. I was wondering is it possible to create a macro that can be reused even when the raw data coming in changes the position of the cell that the macro was originally connected to, along with moving the desired data to the next column across along a table.
To give an example. The below screenshot displays the raw data and table worksheets. The current months data - highlighted in yellow, C8 and G8 - needs to moved to the next worksheet 'Table' under the current month and must correspond to the equivalent bread type. What I want the macro to do is to understand that: the next time I run the macro rather than taking the values from cells C8 and G8 and placing the values into I4 and I5 of worksheet 'Table' respectively. I want it to essentially create a recurring cycle of taking the next two values below and placing them in the next empty place along the table in the worksheet 'Table'.
I attempted to use offset but it means I would have to keep editing the macro to alter the desired location to take and place the data which defeats the purpose of what I am trying to achieve.
I do not know if this is really simple and I'm just not getting it or whether it is relatively tricky. Eventually I hope to take these learnings to use this macro on a larger scale if possible but for now I just want to get the basics of it correct. I would really appreciate any help as I am only beginning to find my feet with macros. Thank you in advance.
I need help with an excel macro. I have only started to use macros and as a result have a very basic knowledge and understanding. I was wondering is it possible to create a macro that can be reused even when the raw data coming in changes the position of the cell that the macro was originally connected to, along with moving the desired data to the next column across along a table.
To give an example. The below screenshot displays the raw data and table worksheets. The current months data - highlighted in yellow, C8 and G8 - needs to moved to the next worksheet 'Table' under the current month and must correspond to the equivalent bread type. What I want the macro to do is to understand that: the next time I run the macro rather than taking the values from cells C8 and G8 and placing the values into I4 and I5 of worksheet 'Table' respectively. I want it to essentially create a recurring cycle of taking the next two values below and placing them in the next empty place along the table in the worksheet 'Table'.
I attempted to use offset but it means I would have to keep editing the macro to alter the desired location to take and place the data which defeats the purpose of what I am trying to achieve.
I do not know if this is really simple and I'm just not getting it or whether it is relatively tricky. Eventually I hope to take these learnings to use this macro on a larger scale if possible but for now I just want to get the basics of it correct. I would really appreciate any help as I am only beginning to find my feet with macros. Thank you in advance.