Cells in one sheet referring to another sheet(stock prices) are no longer valid after second sheet rows are sorted;

Separate sheets work best(simplest) with exported stock prices.