Multiple columns consider one column

I have 4 columns in that i have P and F value and some column values are empty.
Like this as shown below

Col1. Col2. Col3. Col4

P. p.
F. P. F. P

So the requirement is like in all these 4 columns if P appears atleast once then we will consider its Pass and, If both F and P is present then consider as Pass,If only F is present atleast once then it should be consider as fail.
And then make these four column as one column of Pass and Fail.

Please help

Can you share your input excel


Do you mean as the following?

resultArray = dt.Columns.Cast(Of DataColumn).Select(Function(c) if(dt.AsEnumerable.Any(Function(r) r(c).ToString="P"),"Pass",if(dt.AsEnumerable.Any(Function(r) r(c).ToString="F"),"Fail",""))).ToArray

Sequence.xaml (8.6 KB)


Hi @Tabbu,

Try this also using for each row activity,

PassFailUpdate.xaml (12.8 KB)


How to pass column number in filter datatable?

No need to pass column numbers. I have used filter datatable to get only Result column.

Bro but i have many other columns also in my excel sheet .I just want to remove whichever column i do not need

Please follow this steps,

Output Columns Tab Field Descriptions

The Output Columns tab enables you to filter a DataTable by Columns . To do so, you have the following options:


  1. Columns Selection Mode - Specifies whether to filter the columns by keeping or removing them. This can be done by selecting the Keep or the Remove radio buttons. Selecting Keep only keeps the columns that are specified below, while selecting Remove deletes the rows that are specified below from the input DataTable .
  2. Column - The columns you want to keep or remove from the datatable.



When supplying a variable in the Column text box, you can use an Int32 variable to specify the column index , or a String variable to specify the column name .

  1. Add/Remove columns - Clicking the + button adds another column, while pressing the x button removes the column.

Note: Please add required column names and check “Keep” radio button.