I want to remove columns with blanks and certain characters in my data table

Hi,

Your code seems remove rows…
Anyway, can you try the following expression?

BBBB = AAAAA.AsEnumerable.Where(Function(x) Not (String.IsNullOrEmpty(x("Jan").ToString) OrElse x("Jan").ToString.Contains("KEYWORD"))).CopyToDataTable()

Regards,

3 Likes