'How do I prevent wrong sorting from filters with reference data from sheet 1 to sheet 2?

I have a document with 2 sheets. sheet1:

A1Header B1Header C1Header D1Header
A2 B2 C2 D2
A3 B3 C3 D3

Sheet2 references the first two columns of sheet1, but has different data in column C & D:

A1Header B1Header C1Header D1Header
A2 = sheet1!A2 B2 = sheet1!B2 C2b D2b
A3 = sheet1!A3 B3 = sheet1!B3 C3b D3b

The problem is when I sort sheet1 with the help of filters it accordingly sorts the first two columns in sheet2, but it does not keep C2b-C3b and D2b-D3b in sheet2 attached to the sorted column. It stays where it was. Is there a way to tell sheets that these cells need to stick to the referenced data in A2-A3 / B2-B3 when sorting?

After sorting sheet1, sheet2 looks like:

A1Header B1Header C1Header D1Header
A2 = sheet1!A3 B2 = sheet1!B3 C2b D2b
A3 = sheet1!A2 B3 = sheet1!B2 C3b D3b


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source