[RPG] If I cast the Sleep spell and there are multiple creatures with an equal (lowest) number of hit points in the area, which creature falls asleep

dnd-5ehit-pointsspells

I'm playing D&D 5e. The description of the sleep spell says:

This spell sends creatures into a magical slumber. Roll 5d8; the total is how many hit points of creatures this spell can affect. Creatures within 20 feet of a point you choose within range are affected in ascending order of their current hit points (ignoring unconscious creatures).

Starting with the creature that has the lowest current hit points, each creature affected by this spell falls unconscious until the spell ends, the sleeper takes damage, or someone uses an action to shake or slap the sleeper awake. Subtract each creature's hit points from the total before moving on to the creature with the next lowest hit points. A creature's hit points must be equal to or less than the remaining total for that creature to be affected.

What happens if I cast the sleep spell and roll a total of 27, but there are two creatures with 15 hit points in the area of effect?

I did not roll high enough to put both creatures to sleep. Only one can fall asleep (27-15=12). How do you determine which of the two creatures falls asleep?

Caster's choice? Random chance? Higher Constitution modifier?

Best Answer

Xanathar's Guide to Everything introduced a rule for simultaneous effects.

If two or more things happen at the same time on a character or monster's turn, the person at the game table—whether player or DM—who controls that creature decides the order in which those things happen. For example, if two effects occur at the end of a player character's turn, the player decides which of the two effects happens first.

Here, there are indeed two effects happening at the same time: "you try to put to sleep creature A" and "you try to put to sleep creature B". If you decide to first put creature A to sleep, the second effect (trying to put creature B to sleep) will happen, but won't work (since there is not enough HP left).

So it's the caster's choice if it happens during its turn.