How to get row from ADDRESS()

I created a new table and put the value “3” in A1 and “4” in A2.

What I would like to do is: =ROW(ADDRESS(MATCH(A1,A1:A2,0),1,4))
That produces “Err:504”.

This works (result is “1”): =ROW(A1)
This works (result is “A1”): =ADDRESS(MATCH(A1,A1:A2,0),1,4)

I have also tried: =CELL(“ROW”,ADDRESS(MATCH(A2,A2:A3,0),1,4))
That produces “#REF!”

Am I missing something obvious or is there another way to do this?

Your method of calculation seems strange to me, but perhaps this is because you did not describe your task completely.

I think this formula will work for you: =ROW(INDIRECT(ADDRESS(MATCH(A1;A1:A2;0);1;4)))

Yes, this works perfectly. I’m not sure why this is necessary, but thank you! The actual function was pretty long and I had already simplified it when I was trying to figure this out.