r/excel•
Doodlemeyer

Graph vehicle utilization during the day by type of vehicle. I have vehicle type, start time and hours of use.

solved

I have 3 columns of data: VehicleType, Pickup Time, and Total hours order (e.g. Van, 7:00am, 2.0 hours). My boss wants to see graphically what times vehicles are most utilized (on the road). I tried using the data as is, but the graphs come out funky. Times should be displayed in 15 minute increments. Any thoughts?

Posted Jan 13, 2016, 7:12 PM UTC

17
eirunning85170•

You'll need to add some columns and reorganize, but this should do it...

Is that # of hours column formatted as a number? Or have you literally typed into the cell "2.0 hours"?

If literally typed in "2.0 hours", then in the column next to it you can use a formula like this:

=VALUE(LEFT(C2,FIND(" ",C2)))

If it is already formatted as a number, skip that step.

The next column would be something like (B is the start time, D is the formula mentioned above, if not using that one, change D to where the length of time is stored):

=B2+D2/24

This will give you an end time.

You then need to make a separate column of all time intervals. If the first vehicle goes out at 7:00am, start this column at 7:00am, and take it until the latest time. Then one last column next to it:

=COUNTIFS($B$2:$B$5,"<="&G2,$E$2:$E$5,">"&G2)

B2:B5 is the column of starting times, G2 is the cell we're next to (the current time of the 15 minute interval column), and E2:E5 is the column made from the second formula, giving the end time.

Basically, make start and end time data available, then make a column with 15 minute intervals that checks how many cars have that time as being between their start and end times.

1
eirunning85170•

Once you have that, plot the time column on the X axis and the number in the second column on the Y axis and that'll do the trick.

Here's a VERY quick and dirty sample: https://www.dropbox.com/s/nr3vslvl0ib6ekh/time%20charts.xlsx?dl=0

EDIT: If you want to get into future-proofing this (making it dynamic, so you don't have to change those ranges every time you add new data) we can work through making dynamic named ranges :) Just let me know!

1
DoodlemeyerOP•

Thank you!

1
eirunning85170•

No problem! Please consider replying to one of my posts with "solution verified"to throw me some ClippyPoints and change the post's flair to solved.

Thanks!

1
DoodlemeyerOP•

Solution Verified

2
DoodlemeyerOP•

Thank you!

1