You should use a unit variable to keep track of the unit in range with the lower health. Now, pick all units in your unit group. For the first unit, set the unit variable to that unit so it will have a value. For all other units, compare the health of the picked unit to the unit that your variable is keeping track of. If its health is lower than the unit in the variable, set the variable to the picked unit. When you're done with the "pick every unit..." action, your unit variable will have the unit with the least hp stored in it.