Hi Everyone,

I have a list of data that I want to sort in two different ways according to whether the start locations are odd
or even. I could do with wrting a macro for this but not sure where to start.

Excel Forum Pic 2.png

If start locations are odd then I want the relevant rows to be sorted by the next column (the end location) in decending
order.

If they are even then I want the relevant rows to be sorted by the next column (the end location) in ascending
order.

Any ideas?

I've tried recording a macro using sorts but I can't seem to specify the odd/even part and this also only seems to work
for a fixed number of rows, where as in my example, the number of rows will be variable.

Thanks