Macro Help - Copying/Summing/Averaging data from a Master Sheet to Various Months.

Ajw1986

New Member
Joined
Feb 1, 2018
Messages
2
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993}span.s1 {color: #011993}span.s2 {color: #000000}</style>Help?

I am using the MAC version of Excel, so I don't appear to have the same 'Form' functionality as the youtube videos tell me. Regardless, I have created my own 'form' on the first sheet titled 'Form' with some buttons to which I have attached Macros.

My Sheets are as follows:

Form / 2018 Summary / 2018 Data / Jan / Feb / Mar / Apr / May / June / July / Aug / Sept / Oct / Nov / Dec

I have a button 'Save Data' with this macro attached (it copies the inputted data (14 rows by 11 columns) and copies it into '2018 Data'

Sub SaveData()


Set copySheet = Worksheets("Form")
Set pasteSheet = Worksheets("2018 Data")


copySheet.Range("B4:L17").Copy
pasteSheet.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues


Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub

The data that is entered daily consists of 14 rows and 11 columns of data inputted (14 Ferries at specific times of the day, with their associated docking times, leaving times, # of passengers, etc, etc.)

The above macro appears to work in copying all the data from the form over to the '2018 Data' master sheet.

This is where I start to get stumped.

I want the '2018 Data' sheet to remain untouched, but want the 14 rows of data inputted everyday to be averaged or summed (depending on the column), so that in the month sheets there are averages and sums per day. So instead of 14 rows per day, I just want 1 (instead of knowing the passenger counts per boat, I want them per day....and then the turn around times between docking and leaving to be averaged).

Can someone help me with the macro to do this? I have already set up the monthly tabs with tables/headings/etc. Once I have these working, then I can easily have the average and sum values per month linked to the '2018 Summary' sheet to provide monthly sums and averages.

Thank you!!!


[TABLE="width: 1240"]
<tbody>[TR]
[TD="colspan: 3"]DAILY SUMMARY FORM[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]

<tbody>
</tbody>
[/TD]
[TD][/TD]
[TD="align: left"]

<tbody>
</tbody>
[/TD]
[/TR]
[TR]
[TD]Date:[/TD]
[TD]mm-yy[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sailing Number[/TD]
[TD]Depart
(hh:mm)[/TD]
[TD]P.R.A. Count[/TD]
[TD]Apron Down (hh:mm)[/TD]
[TD]Shore Clearance Call (hh:mm)[/TD]
[TD]Turn Around (mm:ss)[/TD]
[TD]Overload[/TD]
[TD]Students[/TD]
[TD]Ambulances[/TD]
[TD]Incidents[/TD]
[TD]Notes[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]6:55[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]8:10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]9:25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10:40[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11:55[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]13:10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]14:25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]15:45[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]17:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]18:10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]19:15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]21:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]22:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]23:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]00:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TOTAL[/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]Daily Average Turn Around Time (hh:mm:ss):[/TD]
[TD="align: center"]#DIV/0![/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top