Filter Excel on multiple criteria blank rows and keep rows containing specific values

@1a2bc346dgjk7544ebjkkbvf ,

Maybe we could generalise with a Regex Expression for all the conditions mentioned :

OutputDT = DT.AsEnumerable.Where(Function(x)System.Text.RegularExpressions.Regex.IsMatch(x(0).ToString,"\b[A-Za-z]{1}\b|[A-Za-z]+[0-9]+|\d{2,}")).CopyToDatatable

Here, DT is the Input datatable and OutputDT is the Output datatable.

Could you try the above expression and let us know if it is working or not. Do try with different data and test it.

2 Likes