need help to count hours from a calendar schedule

sumhungl0

Board Regular
Joined
Jan 1, 2014
Messages
119
i need to get a total of hours from cells in a continuouscalendar type of sheet. sheet setup:dates across the top(row 1) and equipment on the left(col A, frozen). basically the body of cells have informationon what is going on for each equipment on the left under the date in the toprow. sample info cell content: oil change, scheduled usage 0900-1200. which means on that day when the equipment isnot being used it will get an oil change but it will be used from 9am tonoon. what I would like to do is have arow below all the equipment for total hours used during that day. so each cell for that day which contains thetime range"0900-1200", get the difference"1200 minus 0900 =3hrs" and then total all those values to get me a usage for that day. I would like to get this done with a cell formula but I would also like to be able to do this in vba because I do have a need to read each cell and get the hours for that equipment. not just a total for the day. so I guess my question/s are. 1. what would be the cell formula to read the hours and get the difference for all equipment for the day? if possible. might need to have a function to get these hours, not sure. 2. what vba would I use to read the hours in each cell? because I do have a need to look at hours for each equipment for the week/month/quarter/year. any ideas on this? or maybe point me in the right direction? thanks in advance.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,372
Messages
6,124,537
Members
449,169
Latest member
mm424

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