Sum of matching values

Hi everyone,

I have 2 columns data which I’m scraping from SAP. Now i want to count some specific column values and need to subtract from another column value. I need solution either with Excel or directly with SAP scrapped data.

I don’t need solution with Vlookup, i have done that but I don’t want to use Vlookup.

I’m attaching my sample excel below.

Column Calculator.xlsx (9.6 KB)

First I want to add if the column contains - “Un authorised” - this i need to add where ever I get the column with this name

Second i want to add “Out for delivery” - where ever I get column value with this name i need to add

In final I need to substitute. UN AUTHORISED - OUT FOR DELIVERY values.

Please refer Excel i have added a sample example there

Hi! Let’s clear some things first.

First I want to add if the column contains - “Un authorised” - this i need to add where ever I get the column with this name

So you want to check if the first column contains “Un authorised”. If so, what are you going to do with it?

Second i want to add “Out for delivery” - where ever I get column value with this name i need to add

Again, i think you want to check whether the column contains “Out for delivery”, but what are you going to do in case there are such values?

In final I need to substitute. UN AUTHORISED - OUT FOR DELIVERY values.

Are you going to add the result on a third column?

Hi @AlfredSzene

  1. if my column1 contains Un authorised - i need to add those values and store them in a variable or any column in Excel

  2. if again column1 contains out for delivery - i need to add those values and store them in a variable or any separate column in Excel.

In final - i want to subtract the added columns

Total of Un authorised - Total of out for delivery

Hi @Learner007

You can try this way also it will work for your process in case further if you have more like this AUTHORISED or OUT FOR DELIVERY

Xaml = macthing columns.zip (2.2 KB)

i will attach the xaml ,you can check that …for the out put reference i was attached the screen shot

1 Like

Okay so, you can read the content of the Excel file into a datatable and filter it so you have only the rows that contain “Un authorized” or “Out for delivery”. After that, you can loop through the rows and check for the value and just increment your variables. In the end you can assign a new variable with the difference between the two created previously.

Thanks @Praveen_Mudhiraj it worked.

1 Like

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