Hello
Not sure what kind of caculation you do, but did you try pivot table instead? That might work beautifully too.
Otherwise, convert Sheet A to an Excel Table and use structured references..
To do so , click anywhere in Sheet A data. Go to Insert > Table (check “My table has headers”). Give the table a name like, such as "MyTable".
Then formulas won’t break when you insert rows, and references expand automatically.
For examples, if you want the price where Date = B2 and Ticker = A2, you can use formula and references like this:
=XLOOKUP(A2&B2, MyTable[Ticker]&MyTable[Date], MyTable[Price])