Multiply and find percentage

datatable
excel
activities

#1

I want to multiply two columns of an excel sheet and then find the percentage of the total. I have attached my excel sheet .
Can anyone please help with this. I am new to UIPATH. w1.xls (16 KB)


#2

write these formulas to the excel file

in C column
=A2+B2 this will gives you the sum of A2 cell and B2

in D column,
=C2/100*20 this will calculate the 20% of the C column value

both formulas can be written through the loops.


#3

Thanks bro
Can you please tell me which activity should be used to read formula. Is it “Read Cell Formula” ?
I tried with that, but not getting the output.
Can you just send me the sample Xaml file whenever you get time.
Thanks in advance.


#4

check the output

Main.xaml (9.3 KB)


#5

hey, Thank you for responding. Btw, I am are not able to write the output to the same excel file under a particular column named Total and percentage. The workflow is working perfectly, but cannot write to the same excel. @ddrdushy1


#6

check this
Main.xaml (11.0 KB)


#7

It worked perfectly. Thankyou @ddrdushy1. Now I am trying to multiply and divide the same columns “Number of items” and “price”. Will that be possible by changing the operator in ASSIGN “TOTAL=” from " + " to " * " or " / ". Or else can you suggest me a better idea. Sorry if I am troubling you, as I am new into this, it is taking time to learn things.


#8

requirement not clear, could give the input and output ?


#9

This is my excel sheet.
In this sheet, the output is like below
Total = Number of items + Price
But I need
Total = Number of items * Price
Is there any way to perform that action ?


#10

just change the assign activity + to * it will work


#11

Yea, Got it. (After changing the variable type of total from “Generic value” to “Int 32”)
Thanks a lot!