Get max value from extracted datatable

I have statement data in datatable using screen scraping all column in string data type, I want to get max debit entry from debit column with remaining balance from bal. Column.
I write extracted datatable in Excel shows number stored as text.
Due to this I’m not able to find max value from debit column.
Please give the solution…

HI @Anil_Potekar ,

Refer below link for datatable any operations

Regrads,
Arivu

1 Like

Hi @Anil_Potekar

Can you please give some examples of the data.

Thanks

1 Like

@Anil_Potekar

1.Either change the column type in datatable to double

Or

When needed try converting the string to number and then use in formula

Cheers

1 Like

@Anil_Potekar

Use = text(number,“000.00”) second is the format then you wont get the error

Or as said earlier try changing the datataype in datatable or in the excel

Cheers

1 Like

Hi @Anil_Potekar ,

Can you try this one.

simple solution
maxVal= dt.AsEnumerable.Max(Function (y) CDbl(y(“debit”).toString.Trim))

Detailed solution

Anil_Potekar.zip (80.0 KB)

Regards
Balamurugan.S

1 Like