I do not have any experience with VBA coding and I need your help to start learning.
I have two different sheets, The first one include the input from the user and should get the output as well.
The second sheet has all the data.
The user should input two variables D and W in the first sheet , The W value is fixed and the user will choose it from drop down list.
The code should find 2 rows with the same input W value and closest larger and closest smaller with respect to the value of D. Then it should copy these entire rows from sheet 2 to sheet 1.
I have two different sheets, The first one include the input from the user and should get the output as well.

The second sheet has all the data.

The user should input two variables D and W in the first sheet , The W value is fixed and the user will choose it from drop down list.
The code should find 2 rows with the same input W value and closest larger and closest smaller with respect to the value of D. Then it should copy these entire rows from sheet 2 to sheet 1.