How to do the sum of two columns by filtering the other column

There are four columns, first column has filter, the 2,3 columns should be sum and should be written in the fourth column. How to do that.

Hi @anjani_priya

Can you please provide sample input excel and output.

Regards,

input1.xlsx (13.6 KB)

@anjani_priya

Can you try the below

The image shows a filter settings dialog box with options for basic and advanced filtering, configured to filter values less than or equal to 200. (Captioned by AI)

Sequence15.xaml (17.6 KB)

Regards,

1 Like

Hi @anjani_priya

You can use the Excel activities to achieve this. Check the below steps,
→ Use the Excel process scope activity inside of it insert the Use excel file activity.
→ Give the path of the file in the Use excel file activity.
→ Inside Use excel file activity insert the Filter activity to filter the First column. Click on Configure filter and give as below as per your condition.
The image shows an advanced filter setup with criteria that filter values starting with "1" or "2", along with OK and Cancel buttons. (Captioned by AI)
→ After Filter activity insert the For each excel row activity to iterate the each row of the filtered data and give as below in the range field,

Excel.Sheet("Sheet1").Range("_FilterDatabase")

→ Inside For each excel row activity insert the write cell activity and give as below,

- What to write -> (Cdbl(CurrentRow("col1").ToString)+Cdbl(CurrentRow("col2").ToString))
- Where to write -> CurrentRow.ByField("total")

Check the below workflow for your better understanding,

Hope it helps!!

1 Like

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