Excel data row

Hi

I have number of column in Excel such as,

S.No Name Rank Status

  1. Sam     2       Pass   - it will be given by me 
    
  2. Sam     2      -------   output will be "Pass" compare by this row and above row is equal 
    
  3.  Ram    1      -------   Outpt will be "Fail" comparing by this row and above row is unequal.
    

in above it need to check row(“Name”) of previous index and current index will be equal need to write row(“Status”) is Pass as above row .
If it will be failed need to update by fail.

Regards,
@Spark_robot

declare a temp variable which will store row(“Name”), inside the loop.

In the next loop, if temp equals row(“Name”), then update the status. Temp will be then overwritten with row(“name”) at the end of loop

loop.xaml (8.0 KB)

1 Like

Follow these steps to achieve the output -

  1. Read the Excel into Data table, say DT1
  2. Create a variable, say prvName with a default value “”
  3. For each row in DT1
    if row(1).ToString == prvName then
    Write Cell Activity to update the Status
    End if
    prvName = row(1).ToString
1 Like

Thanks all am followed your methods its very helpful:blush:

1 Like

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