Tag first instance of item based on criteria

urkas

New Member
Joined
May 11, 2010
Messages
19
Office Version
  1. 2019
  2. 2016
I need to Tag the first instance based on Criteria

I need it to search a all instances and always Tag the first Match if the Item (39576 ) the Table T014 or T011) and if its Passed and Tag the first date of that pass

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Station[/TD]
[TD]Start Time[/TD]
[TD]Result[/TD]
[TD]Tagged[/TD]
[/TR]
[TR]
[TD]39576[/TD]
[TD]T014[/TD]
[TD]10/27/2017 11:59[/TD]
[TD]Fail[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]39576[/TD]
[TD]T014[/TD]
[TD]10/27/2017 12:22[/TD]
[TD]Pass[/TD]
[TD]Tag[/TD]
[/TR]
[TR]
[TD]39576[/TD]
[TD]T014[/TD]
[TD]10/27/2017 14:41[/TD]
[TD]Pass[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]39576[/TD]
[TD]T011[/TD]
[TD]10/27/2017 14:58[/TD]
[TD]Pass[/TD]
[TD]Tag[/TD]
[/TR]
[TR]
[TD]39576[/TD]
[TD]T011[/TD]
[TD]10/27/2017 15:11[/TD]
[TD]Pass[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Assuming ID is in A1

=IF((D2="Pass")*NOT(SUMPRODUCT((A$1:A1=A2)*(B$1:B1=B2)*(E$1:E1="Tag"))),"Tag","")

in E2 and drag down
 
Upvote 0
Its not looking at date at all though ? C

I wish I could upload the sheet
 
Upvote 0
Assumption was that the dates for a particular ID/Station were in ascending order. If not then that formula will not work.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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