You can't do anything to excel to make it recognize this.
But you can modify your data.
Find a key for each group of rows that should be treated as one. Make sure you
include a subkey (for each row within that group). Then sort by that
key/subkey.
An alternative if you're using less than 256 fields would be to flatten your
logical record into one physical row. Then sort that. Then extract it back
into the way you want (multiple rows).
But your life will be much simpler for lots of things if you can just use a
single row per record.