Multiply two columns of a excel table

Hi everyone , I am new to UiPath. I have got a task where I have to multiply 2nd and 3rd column and display the total in new column .here is the input file . data.xlsx (10.9 KB)
I searched for the similar topic , but I didnt find any . Thank you in advance :slight_smile:

Hi @simadri,

Using Read range activity get the data and using for each statement Loop through it.
row(“result”)=Convert.ToInt32(row(“value1”).ToString)*Convert.ToInt32(row(“value1”).ToString)

After that use Write range activity to update the data in that sheet

Please refer below xaml file @simadri

ExcelTable.xlsx (8.2 KB)
MultiplyTwoNumbers.xaml (10.0 KB)

Regards,
Arivu

3 Likes

@arivu96 hey , thank you so much . It is working now … :blush:
Can you help me with adding the total in row wise … ???

1 Like

Hi @simadri,

Row wise or column wise.

Give me the same example.

Regards,
Arivu

I want to calculate the “total” one by one row wise and should display the result in the same column.for example CRU_ICR1001.xlsx (9.2 KB)
sum of total cost is displaying … Please help

Hi @simadri,

Create int_total variable(int32)

Each Loop assin the value to int_total.
Assign → int_total = int_total+((convert.toint32(row(“value1”).ToString)*convert.toint32(row(“value2”).ToString))

Use add data row activity after for each data row.

Array row {“”,“”,Int_total}

After that use Write range activity

Regards,
Arivu

1 Like

hey @simadri

You can check it out with the existing thread as well.

Regards…!!
Aksh

1 Like

I did not get you . Can you send me the file?

Hi @simadri,

As per @aksh1yadav suggestion i did the sum of the column, please use the below xaml files.

ExcelTable.xlsx (8.2 KB)
MultiplyTwoNumbers.xaml (12.6 KB)

Regards,
Arivu

2 Likes

Hey , I got the output in total column. Just added one more ’ “” ’

Thank you so much . It is working completely fine now :smile: