Help calculating days spent travelling at / between locations

jdawg1984

New Member
Joined
Aug 22, 2018
Messages
2
Hi,

I have a list of travel itineraries with the names / IDs removed for GDPR / confidentiality reasons that I don't have access too.

Each set of rows that are consecutively filled is one person's itinerary. Following a blank row a new persons itinerary starts. I have approx 10 different workbooks each with approx 2000 rows of itineraries as above.

Is there any way to calculate days spent travelling and days spent at specific locations (e.g.in London) for each person using a formula that i don't need to copy / paste thousands of times?

Any help much appreciated.

ABCDEF
Name / PostDepart.FromToArriv.
27/12/2007Luton airportstevenage29/12/2007
03/01/2008stevenageplymouth05/01/2008
14/02/2008plymouthlondon14/02/2008
18/02/2008londonparis18/02/2008
23/02/2008parisLuton airport24/02/2008
21/11/2007London Heathrowedinburgh22/11/2007
25/11/2007edinburghPitlochry25/11/2007
26/11/2007PitlochryPitlochry22/10/2008
20/11/2007LondonCaracas21/11/2007
29/11/2007caracasgeorgetown26/12/2007
29/12/2007georgetownsan jose31/12/2007
17/02/2008Panama cityhavana18/02/2008
21/02/2008havanamiami11/04/2008
12/04/2008miamiLondon14/04/2008

<colgroup><col width="87" span="6" style="width: 65pt;"></colgroup><tbody>
</tbody>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
In column F calculate the time spent in location B:

=IF(C2=D1,B2-E1,"")

In Column G calculate the time spent travelling from location B:

=IF(B2="","",E2-B2)

If you need total by location I'd use a pivot table
 
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...-calculating-days-spent-at-each-location.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Apologies, I am new to forum posting in this regard and wasn't aware of the rules, I wasn't sure how it all worked but have received useful replies from both threads.
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,656
Members
449,045
Latest member
Marcus05

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