Hi - I'm not really sure what I need so I'll just explain what the file represents and where I'm trying to go. These are travel diaries of matched couples (individual ID represents the husband and wife within the same household (household ID). Columns DM-DZ represent the time each individual spent at an activity based on how long they were there. I need to do this in two separate ways: the first is things that they did independently from their partner, and the second is the things they did jointly with their partner, based on the TravDay (column CI), TripStart (CZ), and TripEnd (DC) all matching. So if the husband and wife match on all three of those, then I need 14 columns similar to DM-DZ, that counts the total amount of time by TripPurpose (CS). I then need the 14 columns again for any activities which they don't match their partner on. Sorry, I know this is complicated.
Solved by T. H. in 14 mins