Tracking # of people in the building, on the 1/2 hour

GlennJ

Board Regular
Joined
Mar 26, 2018
Messages
63
Office Version
  1. 2016
Platform
  1. Windows
Hi Everyone,

I'm looking for a macro to run every 1/2 hour starting at 10am and the last entry at 2AM (33 entries per day). I have 2 sheets. I need the macro to copy the cell in Sheet1 (B2) to Sheet 2 and paste it into the next blank cell until that row is full and then start again on the next row (next day) until the month has ended.

I'm tracking the number of people that are in the building for each 1/2 hour of the day. Another macro changes the value in Sheet1 every time someone enters or exits the building.

Thank You for any help you can offer.

Glenn




25
Sheet1

10:0010:3011:0011:3012:00
Sept 11522253550
Sept 21016293145
Sept 31512paste here
Sept 4
Sheet2
 

Attachments

  • Sheet 1.jpg
    Sheet 1.jpg
    27.4 KB · Views: 3
  • Sheet 2.jpg
    Sheet 2.jpg
    52.1 KB · Views: 3

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
May I suggest a simple improvement on your data sheet structure? You might want to use fewer columns in your database sheet. Things will be a lot easier in the long run if you had just three columns: One for date, one for time and the third one for number of people.

The current setup (fewer rows with tons of columns) may be easy to understand when you look at it but computers prefer more rows with less columns. From this setup it'll be easy to get to the user friendly multiple columns setup but not that easy to go the other way around.

The save code itself is really easy to come up with - especially with the suggested data structure - but I'm not that familiar with the automatic timer codes so I'd rather leave that part to those better than me.
 
Upvote 0
Thanks Misca, I changed it to the way you said and I figured the VBA code I need.
Thanks for the help
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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