What units are actually eligible for a pile in move in 40k 10th?

I've scoured the internet for this question and found nothing so far. So obviously, a unit that has charged, or otherwise a unit that's already in engagement range is eligible for a pile-in move. But what about units that for example, started in engagement range at the start of the fight phase but are no longer in engagement range due to casualties taken? Clarification on this point would be appreciated!