# Hi everyone

May I ask that how can I use UiPath to do some calculations other than using excel? For example, finding the average

@Happydayyy

You can directly do as

If you have a list of numbers

Then Enumerable.Average(listvariable) will give the average

Or of you have all numbers in different variables then just add all of them and then divide by the total count even that would give average

Cheers

You can do it with the Linq Expressions.

Or you can do it with simple logics by using some mathematical methods.

Hope it helps!!

If the outcome is in cell F2, i want to find the average (E1:E2);
the outcome is in cell F4, i want to find the average (E3:E4);
the outcome is in cell F6, i want to find the average (E5:E6), and so on, how i do in the robot?

I suggest doing the free training on academy.uipath.com so you’ll learn the basics of what UiPath is and how it works.

You’d Read Range the sheet into a datatable then do the calculations on the data from the datatable.

An sample workflow to clarify

CalculationsSample.zip (9.2 KB)

thank you very much!

May i also ask that is it feasible to put the data from two columns (E2:E3), (E4:E5) and so on and (F2:F3), (F4:F5) and so on from seed sheet and then paste it to one column (G2:G20) from output sheet?
Explanation: From seed sheet: (E2:E3) and (F2:F3), given the amount of data is E2=E3 and F2=F3; E4=E5 and F4=F5… and so on.

To column G in output sheet: paste (E2:E3) to G2, paste (F2:F3) to G3; paste (E4:E5) to G4, paste (F4:F5) to G5; paste (E6:E7) to G6, paste (F6:F7) to G7

May i ask is it feasible to do it? and/ or what method do i need to use if it is feasible?