Hi,
My question is explained in the attachment.

Example 1.xlsx