How to compare excel row by row comparison and view same excel sheet column output

image

  1. Take the file Chart number and compare it to see if there is a duplicate in next row.
  2. If it is duplicate, the values of both are added (+) amount column.
  3. Otherwise, the single value is put in the same amount column.
  4. At the end, the excel file should be as shown below. There should be a completed amount column.

image

Hi @nkaushalya ,
I think you can read range to get data then compare ChartNumber, if they are duplicate → + value, then write to account
I will test your file
Regards,
LNV

Hello @nkaushalya ,
Dint the Xaml That I shared last time work for you?
Main.xaml (15.4 KB)
Please let me know if this works.
Regards;)

Hi @Nguyen_Van_Luong1
you can use this excel file
excel.xlsx (9.5 KB)

yes but I want to all values type in next column.It’s working duplicates are enough.also need type single values.

1 Like

hi @nkaushalya

You want the output like this

image

(From row In dt.AsEnumerable()
Group row By chartNumber=CInt(row(“Chart number”).tostring) Into grp=Group
Let amount = grp.Sum(Function(column) CInt(column(“Values”).tostring))
Let values =grp.Select(Function(column) CInt(column(“Values”).tostring))
Select dt.Clone.Rows.Add({chartNumber,Values,amount})
).copytodatatable

Hooe it helps…

image

No, I want like this. (amount column )

Hello @nkaushalya
You can try using this method
I have attached the
Excel_Comparison.xaml (11.6 KB)
xaml file below
Regards

Hi @nkaushalya

could you please check the below file
ForumUsecase.zip (9.6 KB)

Hope this helps

Hey @nkaushalya ,

You can try the xaml attached below
Main.xaml (12.0 KB)

Output:-
image

1 Like

Hello @nkaushalya ,
I have checked your Input Excel File and have followed the Workflow Accordingly, and it works fine for the Input Excel File and provides the Output, Please check the Xaml File:
Main.xaml (16.7 KB)
I hope This helps.
Regards;)

Hi @Quenton_Wayne_Rebello,

This was worked fine and that I have expected output.

Thank You So Much!!!
NK.

1 Like

Hey @nkaushalya,

Glad to be of help

1 Like

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