Greatest number

In an excel I have a list of value such as 15,10,85,95 from this it should find which is the maximum value how could I achieve it

2 Likes

Use read range activities and assign a datatable variable type and try to use this syntax

dt.AsEnumerable().Max(Function(row) row(“colname”))

@soumi_soumiya

cheers :smiley:

Happy learning :smiley:

4 Likes

@soumi_soumiya

How the data appearing in Excel sheet - column / row or in a cell ?

2 Likes

@soumi_soumiya

Try this:

 int maxValue = CInt(inputDT.AsEnumerable().Max(Function (row) row("ColumnName")))
2 Likes

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