Sum a column but leave the last cell value

i have an excel i want to get sum of a particular column but i want to leave last value cell in that column how to do that
D2.xlsx (8.3 KB)

i have above excel i want to sum the column making sure last cell value is not included

@manoj_verma1

Read the data into datatable dt

Use this in assign - sum is of type double, used 0 as column index assuming there is only one column else change the column index or use column name accordingly

Sum = Dt.AsEnumerable.Take(dt.Rowcount-1).Sum(function(x) cdbl(x(0).ToString))

Cheers

1 Like

Hi @manoj_verma1 ,

Check this below workflow attached,
Uipath_RemoveLastRow_Sum.xaml (8.8 KB)

image

Hope this may help you :slight_smile:

5 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.