Extracting data from one sheet to the next

OX_2005

New Member
Joined
Feb 29, 2024
Messages
44
Office Version
  1. 365
Platform
  1. Windows
I have a spread sheet that is being filled in via a Microsoft Forms sheet with Power automate. After the table is filled in from the Form I am trying to bring over from the "Data Input"(DI) tab to the "Data Process" (DP) tab the Employee ID Date and Start Time if if in column D of the DP tab is "No". Then on the DP tab I need it to search below the row the data was pulled from on the DI tab and find a row for that employee with a "Yes" in column D and add the End Time into the DP tab, but if it finds a "No" in column D before a "Yes" then just start a new line and leave that cell blank. I am not sure if this is something a little bit of formulas would work or if this would be best done in VBA. Any help would be appreciated.

1732563149369.png


1732563166927.png
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi OX,
As a starter, you could use the FILTER function, I simplified your main/input table to the name tbl and gave the columns a simpler name:
Excel Formula:
=FILTER(tbl,tbl[remove]="No","EMPTY")
-> as No is a start time, you probably only want to start with those (where No is the starttime).
Next, in a column next to that area, you could do:
Excel Formula:
=XLOOKUP(1,(tbl[time]>K2)*(tbl[id]=M2),tbl[time],"-",0)
-> (in K2 is the first timestamp of my FILTER, in M2 the first ID). So you're basically doing a XLOOKUP with 2 criteria: the ID should match and the timestamp should be greater than that line. That should give you the "next line of info" for that combo. So you can use that with some more formulas to state whether there is an end time or not.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,862
Members
452,676
Latest member
woodyp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top