I have data like this:

A B A B A B A B
1 10 2 20 3 30 4 ?

The trend formula is =trend (known y, [known x],new x)

Generally we select the known y values which are in continuous cells, and
then select known x values, after which for a new x value – y-values could be
estimated.

But is there any way that this could be done by selecting y and x – values
which are in non-contiguous cells( like values if present in alternative
cells)

Thanks