Link to home
Start Free TrialLog in
Avatar of ScottBarnes
ScottBarnes

asked on

Excel VBA to copy data used for chart onto the MAF_History tab

I have tab called Dashboard that has recent data and I also have a tab called MAF History containing the same date for older time frames.  Once the Watts Per Kilo Gram on the dashboard page goes from 0.00 to a value higher than 0.00 I would like to have it copied to the MAF_History tab so that it can be included in the chart.  I want to make sure the vba will not copy duplicate records, just records that are new should be copied to the MAF_History tab.  Instead of having to click a button to copy over the data, it would be preferred to have it happen as soon as a new value is updated.

I purposely have the data on the Dashboard page in column K6, then columns O6:R6 because that is where they are on my master template.
Charting.xlsm
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ScottBarnes
ScottBarnes

ASKER

I've tried searching for solutions like mine and also trying to record my own macros, but no luck on either front.

Would it possible to make column [K],[O],[P], and [Q] the unique key that way if data is changed on the dashboard tab it would get copied over to the [MAF_History] tab?

If not, column [K] "Date" on the Dashboard worksheet would work as the unique key that could be verified against column B (row 24 & onwards) within the [MAF_History] worksheet.

Thank you in advance,
Scott Barnes
Ah... you were asking for somebody to do this for you, not for help with the task.

OK.

Yes, either way can be implemented, as you require:

a) just column [K] "Date" (row 6 & onwards) from the [Dashboard] worksheet matched to column [ B ] (row 24 & onwards) upon the  [MAF_History] worksheet,

...or...

b) A combination of columns [K] "Date" / [O] "Weight" / [P] "HR" / [Q] "Watts" on [Dashboard] matched to columns [ B ] "Date" / [C] "Weight" / [D] "HR" / [E] "Watts" on [MAF_History].

However, if you opt for the second option [ b) ], can your Chart on the [MAF_History] worksheet cope with multiple entries for the same "Date"?

That is, are multiple entries for the same "Date" (but differing values of "Weight", "HR", &/or "Watts") 'valid'?
For the second option b), if one of the values changed it would be ideal to overwrite the previous values so that there is never a duplicate date.
I've requested that this question be closed as follows:

Accepted answer: 500 points for fanpages's comment #a41040772

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Please close ticket, I will try to ask the question with more detail to get more responses, none of the responses resolved my issue they just asked me more questions that I should consider when framing up my question.