is there a way to have a COUNTIF() function move from

COUNTIF(A:A,">5") to COUNTIF(B:B,">5")

without actually changing the A's to B's so it could be a recursive function?