If you vote for the minor parties and there are 5 candidates then your fourth vote listing for one of the 2 major parties then that is the part of your voting that counts.
Or, if allowed for the election (as it is in Queensland state elections) you are able to only vote for the candidate of your choice, then if they are excluded, the vote is then exhausted.
(from ECQ Qld)
When you go to vote the issuing officer will hand you a ballot paper for you to complete and place in the ballot box provided. Voting instructions are provided on each ballot paper. Electors can cast a valid vote in three ways.
1. An elector can vote by expressing a single primary preference for one candidate only (marking only one square with the number 1, a tick, or a cross, leaving all the others blank).
2. An elector can vote by expressing a partial distribution of preferences by voting for some, but not all candidates on the ballot paper (marking some but not all squares, such as 1, 2, and 3 on a ballot paper with 5 candidates).
3. An elector can vote by expressing a full distribution of preferences (marking each and every square of the ballot paper in order of preference, such as 1, 2, 3, and so on).
I only voted for the member I wanted. The rest in my electorate (Brisbane Central) are trash.