I’m trying to take the average of all the numbers in the excel and trying to highlight the rows which are above average. I’m attaching the excel below can anyone please help me out with this.
Calculation Criteria - take the average of prices, highlight rows in excel anything above average price for all kind’s models scraped.
Note:The number of models or columns may change each time.
@varma
Use this code
yourDataTable.AsEnumerable().Sum(Function(row) row.Field(Of Integer)(“yourColumnName”)) —Sum all values in a column
Then divide the above result by yourDataTable.Rows.Count, will get average of that column.