VBA
New Member
- Joined
- Jan 19, 2009
- Messages
- 39
Heya,
I've got the following spreadsheet:
As you can see, I've sorted it by column A. However, sometimes the date is the same and then it doesn't always go right... see f.ex. 17 dec, where the ship arrives in the harbour and then is at sea again and then departs
Not exactly what happens. I had the same problem on 28 dec, but there it disappeared when I told Excel to sort secondly on column B.
However, this doesn't work for 17 dec.
So I need a way to sort such, that D always follows on A (after arrival, one departs) and S might be either after D or before A but not before D or after A...
If you follow 
Can I do this in Sort (some sort of "custom sort") or should I write a macro for it?
Thanks in advance.
I've got the following spreadsheet:

As you can see, I've sorted it by column A. However, sometimes the date is the same and then it doesn't always go right... see f.ex. 17 dec, where the ship arrives in the harbour and then is at sea again and then departs

However, this doesn't work for 17 dec.
So I need a way to sort such, that D always follows on A (after arrival, one departs) and S might be either after D or before A but not before D or after A...


Can I do this in Sort (some sort of "custom sort") or should I write a macro for it?
Thanks in advance.