This is just like the macro I use for finding the foremost living leader of the group. So yes, based on the nodead conditions it will run through each target and focus the foremost character in the group.

I use /assist's in each spellcast though and a seperate one for setting focus for each char (so i can keep my focus feared/sheeped) It does work fairly well, but occassionally i've found it will target one of my newly dead characters and i've no idea why... anyone have any insight into this?