Assuming your data begins in row 2, then in C2 add a helper column with formula:
=IF(A2<>"",A2,C1)
copied down.
Then Copy this column and Paste Special >> Values over itself.
Then perform a Sort with sort level set as by Column 3 first, then by Column 1 second, and by column 2 last.
You can then delete the helper column.
Bookmarks