Sorry if I'm really bad at explaining this..

Basically I have a lot of data on sheet2 which through a formula is also displayed on sheet1. However, when I data sort sheet 1, the formulas do not change and are therefore picking up the wrong pieces of information from sheet2.

I found I can solve this by putting $A$5 instead of A5, for example. However I need to do this for A LOT of data so I obviously can't just drag down to autofill. Is there a solution to this problem?