How to perform average in excel for rows via StudioX

Dear all, I wish to seek some helps here. I am trying to perform calculation for average formula in one specific column where the average must be considered for all rows.

In example below, I want to get the average sum in column B then put the average sum into cell H1.

So my coding does not work as expected after I used “Write Cell”. Appreciate someone can assist in this matter. Thanks!

Hi @ctsoo

This is not UiPath but Excel related question.

To be able to dynamically apply average on all the rows you need to:

  1. format A1:B9 into a table and (optionally remove header row, banded row, filters)
  2. add a name manager to reference your tablename (example, table1)
  3. adding new rows will automatically be part of table1
  4. use structured reference to access your table column name Percentage and convert the formula =AVERAGE(B2:B9) into something like the the reference shown below