I’ve got an excel table with dates trucks left and returned, first column is date went, second column is date returned, third column should be number of trips the truck has made.
If the truck left 26th May and hasn’t returned till the end of month, I want the third column to give an answer of, ((31-26)/12). {31 being number of days of the May month, 26 being the date the truck left, 12 is just a factor}
Again if the truck returned in 6th June but didn’t leave in June, I want the third column to give an answer of (6/12) {6 being days spent in June}
Again if the truck left and returned within the same month, regardless of the number of days spent, I want the third column to give an answer of 1{1 being one trip}
And if the truck left in 24th May and retuned 8th June, I want the third column to give an answer of (8/12) 8 being days of June, 12 is just a factor.