The values in A7 and A8 are 1004. In cell D8 I have the following formula:
=IF(A7+1=A8,"AA",ROWS(ADDRESS(ROW(A8)-1,COLUMN(A8),2,1)&":"&ADDRESS(ROW(A8),COLUMN(A8),4,1)))
The formula evaluator shows the ROWS function evaluating to ROWS(A$7:A8) which then evaluates ultimately to 1 instead of 2...