How to get all values from datatable except the mentioned value

I was able to get the specific columns into the data table but now im facing a challenge of finding all the values except value “0.00” in the datatable.

you mean get the values of a column exception for 0.00?

yes. in the datatable i have values as “0.00”, “-1.2”, etc
But i want to get all values apart from “0.00” along with their cell position so that i can correct them later.

Hi @Prince1 ,

Assuming you wish to filter the Data Table without “0.00” for a particular column, this ought to do the trick:

Dt.AsEnumerable.Where(Function(s) Not s(ColumnNameOrIndex).ToString.Trim.Equals(“0.00”)).CopyToDataTable

Kind Regards,
Ashwin A.K

1 Like


Provide your input dt and output dt and column name
Let me know if you need anything else

1 Like

I tried using Filter wizard but in output im getting all the values of the table.
Issue im facing:
I have 6 columns(cost1, cost2, cost3, etc ie. column N to Column S) which i successfully managed to get it into Datatable. but now i want to know the Cell position of all the cells where i have negative values in it as shown below.
ie. At N4 i have -$20, at P7 i have -$20 and so on

you can loop through rows and specific columns. Within this loop you can use if activity to check if value is <0. Store row’s and column’s number and you will be able to find the correct cell.