There has recently been a spate of senators discovered to be possibly ineligible to stand for their positions for various reasons. The question naturally arises as to who replaces said senator. The common supposition is that the next person on the party ticket is likely to get it, but surprising things can happen with preference flows. Confirmation requires that the votes have to be recounted, an act of the AEC, which takes a long time.
There are two different open source projects that can let anyone count this, but they require some effort to set up. I have put a web front end on mine at https://vote.andrewconway.org allowing non technical people to answer the question in seconds with their choice of candidates excluded.
And yes in each case listed above the next person on the party ticket is the one to get the new spot. Make sure to read the list of reasons that my answers may differ from the official ones.