Floating values being compared with integer

I have a column with floating point values, i need to compare all its values with 100000. I’m using if condition —> Convert.Toint32(row(“column name”).Tostring.Trim) > 100000
But it is giving an error - input string was not in correct format. Can anyone help?

@tanu - Please try cdbl…instead of convert.toint32…

Now the error is - Conversion from string “” to type ‘Double’ is not valid

@tanu - you have blank or null values in the column. So filter that out before applying the code.

the column name wasn’t working, so i’m using index instead.
cdbl(row(6).Tostring) > 100000

Still giving the error conversion from string “” to type ‘double’ is not valid

Again, error clearly tells you that when it trying to convert the blank or null values to double and it is failing. Please check the column and filter the blank/null values out first and then apply this conversion.

Okay, i added another if condition to filter out null and blank values, now it says -

If: Conversion from string “66/60” to type ‘Double’ is not valid.

@tanu - please share your column values ?

Just checked again, there was a hidden value 66/60 in one of the cells. There are a couple of extra cells before the column “Total” begins. So I need to set a range to check the beginning and ending value of column. How can I do that, can you help?

@tanu - After reading the read range to Dt, use the below query to skip the rows(please adjust 7 as per your needs)

Dt = Dt.AsEnumerable.Skip(7).CopyToDataTable