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

Hi!

I want to remove a column with blank and certain characters from the data table.
The blank code came from someone else’s question.
I would like to know the code to add a specific character here. :thinking: :thinking:

Is there a Superman who can help you?

1 Like

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,

2 Likes

thank you!
I never thought he would help me so quickly!

It worked fine with your code.
You solved it faster than I had ever thought.

You really are a superman! :heart:

With gratitude.

1 Like

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