Getting info from dynamic excel

Hello i have a excel sheet thats connected to a sql db.

I will have to match a certaint number thats always in tabY ( excel sheet)
Then if the number matches i wont to extract certaint information from different tabs as long as the number matches.

Example if number in tab Y matches NumberA then extract all information down the row in tab A, C, N, P

If number dont match anymore goes into next number to match another number in tab Y and repeat processs