I have a Pivot table(image below) and I need to know how I can create a formula or VBA code to calculate UPH based on the current data. The data is pivot table is dynamic so it can range anywhere from 2hrs to 10hrs. I also need to account for 1 hour where only 30mins are worked and another 2 hours where only 45mins were worked. Any help with this would be amazing, ive been wracking my brain on this for about a week and still haven't been able to solve it.