Plug in values in a table based on earliest date

Hi everyone,

I am trying to make a workflow where the robot is able to find the earliest date within a group and paste in the data to a row when it finds it.

This is table A:
image
it is used as reference to find a group in Table B and we will paste the value from Table A according to their group

This is my table B:
image
I want to plug in values inside this table based on the earliest date it can find within a group. For example the earliest date in group B is 12/22/2018 and the robot will paste in the value from Table A in ‘Values’ column Table B in that row.

This is how the outcome should look like:
image

I have tried to develop the workflow but I couldn’t seem to figure out the logic. My current workflow is working fine without any errors but it doesn’t seem to update anything on the Table B file.
Compare and plug in.zip (25.5 KB)


this is my initial workflow look like for the date comparison part.

I’m sorry if my explanation are unclear English is not my strongest suit :sweat_smile:

Thank you,
Hariz D

Hi Hariz,
I think part of the problem is the Nested IF within BodyB - though it is assigning the earliest date, it is also immediately writing the Value to whatever row it is on, regardless of whether it is earlier or not.
Instead of using the multiple Ifs, try arranging the process in a Flowchart with Flow Decisions- this way you should be able to loop through all of the Excel rows and know exactly which row the earliest date is on, and can then use the row number value as the row input value for writing the Value from DT_A back.