Hey guys,
I am having some issues creating a macro to update cell data in a "master" workbook from another workbook that is generated weekly based on a Part ID. The Part ID is located in Column A in both workbooks, and the weights in the workbook to be read are in Column B. Here's a sample to give you an idea of what the "master" sheet looks like:
A B C D,E,F G
(Row 1) Part Number Secondary ID Description (3 other Columns here) Latest Weight
X0054 ..... ..... ..... Column to be updated.
X0055
Column to be Identified.
As a secondary function, I need the macro to copy and paste the previous "Latest Weight" to the next empty column to right of the latest weight column, keeping the data starting in row 2, (so that the previous week's weight data will be in Column H when the macro is run this week, and in a week from now, when the new sheet is made, this week's data will be in Column I, and so on) before the macro updates the "Latest Weight" column with the new data obviously. I have to maintain the old weight data to keep a running average and standard deviation of the weights. Column D will be average, Column E will be standard deviation, and Column F will be delta, that is the difference between the updated weight data and most previous weight data. Finally, I have not been able to wrap my mind around how to automate the delta calculation, as the most previous weight data location will clearly change after the macro has run each time. I believe the average and standard deviation calculations will be fairly straightforward with the count function though. I have looked up this question on many forums, but nothing I have found seems adequate for what I am looking for. I have very little knowledge of VBA, so any assistance would be much appreciated.
Thank you.
I am having some issues creating a macro to update cell data in a "master" workbook from another workbook that is generated weekly based on a Part ID. The Part ID is located in Column A in both workbooks, and the weights in the workbook to be read are in Column B. Here's a sample to give you an idea of what the "master" sheet looks like:
A B C D,E,F G
(Row 1) Part Number Secondary ID Description (3 other Columns here) Latest Weight
X0054 ..... ..... ..... Column to be updated.
X0055
Column to be Identified.
As a secondary function, I need the macro to copy and paste the previous "Latest Weight" to the next empty column to right of the latest weight column, keeping the data starting in row 2, (so that the previous week's weight data will be in Column H when the macro is run this week, and in a week from now, when the new sheet is made, this week's data will be in Column I, and so on) before the macro updates the "Latest Weight" column with the new data obviously. I have to maintain the old weight data to keep a running average and standard deviation of the weights. Column D will be average, Column E will be standard deviation, and Column F will be delta, that is the difference between the updated weight data and most previous weight data. Finally, I have not been able to wrap my mind around how to automate the delta calculation, as the most previous weight data location will clearly change after the macro has run each time. I believe the average and standard deviation calculations will be fairly straightforward with the count function though. I have looked up this question on many forums, but nothing I have found seems adequate for what I am looking for. I have very little knowledge of VBA, so any assistance would be much appreciated.
Thank you.