Macros can’t use range or the sucess/failure another ability use to determine whether or not to use an ability. The “decisions” macros can make are limited to a small number of pre-set conditionals.
Section 4 of the Macros: Essential Information guide has a list of all of these conditionals with some explanations of what they do: