Hi,
I need a Macro that would on click of the 'Calculate' Button on top of a Quarter's column in the "Average" sheet:
1) Copy and Paste the two columns from "ID" sheet in a new sheet
2) Removes the duplicate 'ID' rows from the data in that new sheet
3) Calculates the average of 'values' for a given quarter based on the data remained in the new sheet, given they are greater than zero and not texts
4) Copy pastes the calculated average value under the 'Quarter' cells in the "Average" worksheet under the designated Quarter.
5) Deletes that new temporary sheet that was used to do all the dirty work from the memory
ID #s are unique and if they are repeated, they WILL have the same ' Quarterly value' for a given quarter. values for 2 different ID #s could potentially be identical so the macro shouldnt remove duplicates based on values. Only the duplicates based on ID # should be removed.
preferably all this hidden behind the scenes and the only thing the user sees be the calculated average value in the cell right under the Calculate Button for the 'Quarter' column in the "Average" page.
If you have any other suggestions that would be easier/better than the process above but would give me the result I want with click of the button, would also work too.
test.xlsx
Thanks alot
Bookmarks