Data Validation In Excel

Hi All,

I hope you’re well :slight_smile:

I am working on a Data Validation piece at the moment. The workbook will contain a column that has National Insurance number in and I am wanting the robot to select the rows where the NI number is missing and copy & Paste them onto another workbook. Instead of getting the robot to filter by blanks and copying the range I was wondering if any of you have done this another way?



Hi @csanders

You can use linq

Dt.AsEnumerable.Where(function(x) IsNothing(x("yourcolumn")) OrElse x("yourcolumn").tostring.trim.Equals(string.empty)).CopyToDatatable


Hi @csanders
To accomplish your goal, you can use a LINQ query.

DataTable.AsEnumerable.Where(function(row) IsNothing(row(“columnName”)) OrElse row(“columnName”).tostring.trim.Equals(string.empty)).CopyToDatatable

1 Like

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