ps: You can also use lua code like this:
Select first raid member tank in spell range with health lower than 50%:
local SpellName = GetSpellInfo(109259)
local usable, nomana = IsUsableSpell(SpellName);
if (not nomana and usable) then
for i = 1, 40, 1 do
local UnitIdString = "raid" .. i .. "target"
if UnitExists(UnitIdString) then
local role = UnitGroupRolesAssigned(UnitIdString);
if role == "TANK" and IsSpellInRange(SpellName, UnitIdString) then
if UnitHealth(UnitIdString)/UnitHealthMax(UnitIdString)*100 < 50 then
CastSpellByName(SpellName, UnitIdString)
return
end
end
end
end
end