Hi,
I’m attempting to write a macro that calculates how many passengers got on a train. So if the passenger time is less than the train time add 1 to count.
As you can see I’ve highlighted what I mean, so for the 0551 train there were 4 passengers.
I’ve started but to be honest I’m a bit lost. I assume I’d need a loop to check that passenger time is less than train time, if it is then add 1 to count, if it’s not place the count in the totals cell and carry on the check for the next train at 0621 but ignoring those passengers already used for the 0551 train.
Any help much appreciated.
Cheers.
Bookmarks