How to get cell values based on another cell value


I need to get the values of cells, my excel like as below:


If A3 contains value 1, B3 contains 0 so then i need to get the value of A2 and assign to variables (StartDate & EndDate)
Like this E3,F3 and G3 contains value 1, so i need to get the value E2 and assign to the variable (StartDate) and get the value of G2 and assign to the variable (EndDate).

Pls advise logic for this…

Thanks in advance,

Hi @muthu.m,
Have a look at this:

Thanks for your response.
Could you please provide sample for my requirement.


@muthu.m… Does the excel cell values remain the same or will change according to the month?

Thanks for the response.

Values are change according to the every week.
Per sheet contains weekly details. This sample is for the 1st week for the month of November 2020.

Thanks in advance,