LearnVBA83
Board Regular
- Joined
- Dec 1, 2016
- Messages
- 113
- Office Version
- 365
- Platform
- Windows
Hi VBA experts!
I have a big data set that shows where individuals went on daily trips using addresses. One column contains the To address and one column contains the from address. Obviously if Row 1 says From Address A to Address B then you'd expect Row 2 to start with From Address B To_____. Also, I want to see if the last trip for the day is the same address as the very start of the trip. For example: (FYI i'm using places instead of addresses and fake names)
Name Date/Time To Address From Address
John Doe 1/1/15 8AM Home WalMart
John Doe 1/1/15 9AM WalMart Dollar Store
John Doe 1/1/15 11AM Dollar Store Home
Billy Bob 1/1/15 9AM Home Bowling
Billy Bob 1/1/15 1PM Bowling Walgreens
Billy Bob 1/1/15 3PM Walgreens Home
Billy Bob 1/1/15 4PM Home Huddlehouse (I'd like for it to flag this because the daily trip didn't end at home)
Jane Doe 1/2/15 10AM Home Mall
Jane Doe 1/2/15 11AM Mall WalMart
Jane Doe 1/2/15 2PM Salon Home (I'd like for it to flag this because she wasn't at the Salon in her prior leg of the trip).
This is basically what my data looks like except real names and 100's of real addresses.
Please let me know if you think you could help!
Best!
I have a big data set that shows where individuals went on daily trips using addresses. One column contains the To address and one column contains the from address. Obviously if Row 1 says From Address A to Address B then you'd expect Row 2 to start with From Address B To_____. Also, I want to see if the last trip for the day is the same address as the very start of the trip. For example: (FYI i'm using places instead of addresses and fake names)
Name Date/Time To Address From Address
John Doe 1/1/15 8AM Home WalMart
John Doe 1/1/15 9AM WalMart Dollar Store
John Doe 1/1/15 11AM Dollar Store Home
Billy Bob 1/1/15 9AM Home Bowling
Billy Bob 1/1/15 1PM Bowling Walgreens
Billy Bob 1/1/15 3PM Walgreens Home
Billy Bob 1/1/15 4PM Home Huddlehouse (I'd like for it to flag this because the daily trip didn't end at home)
Jane Doe 1/2/15 10AM Home Mall
Jane Doe 1/2/15 11AM Mall WalMart
Jane Doe 1/2/15 2PM Salon Home (I'd like for it to flag this because she wasn't at the Salon in her prior leg of the trip).
This is basically what my data looks like except real names and 100's of real addresses.
Please let me know if you think you could help!
Best!