How to extract the updated list that repeated in a row

image
Hi Everyone,

I have the list of this that have repeated in column A with the status at the column B. I want to extract the list just only the latest.

Example:
A - Failed
B - Failed
C - Success
D - Success
E - Failed

As you can see, I only want the latest sequence of A & C as the A & C is repeated. How I want to extract this ?

@tmiqmal

If the last occurance is the latest always…then use the below

  1. read the data into datatable dt
  2. Now use this in assign dt = dt.AsEnumerable.GroupBy(function(x) x(0).ToString).Select(function(x) x.Last()).CopyToDataTable
  3. This will give you only the latest…considering last occurance of anything is the latest

Cheers

Hi,
You can use Dictionary of <String, String> and assign again for each row
Regrads

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.