Read Datatable and get row based on criteria

After using a read range activity, how do you get specific rows based on a criteria?
For example if I read a table and want to get every row that has a “N/A” and store each row count (example: rows A11, A50, A190 have “N/A”) into separate variables.

Or another approach I could think of would be to filter the table within excel for “N/A” and then get the data from there.

After ReadRange, take for each row activity and pass output of ReadRange, then take assign activity and assign row(0). it will gives you the output of all row of 1st column. for displaying the output use LogMssage activity or WriteLine Activity.

for that take filter datatable activity and select Remove RB enter column name then Select “Operation” as contains and pass the value

Thanks, I will give it a go

Hello @p3tr1fy
or you can try like below:

do For each col in dt.Columns

log message – col.ToString & “–” & String.Join(",",(From rw in dt.Select(col.ToString & “=‘N/A’”) select x = (dt.Rows.IndexOf(rw) + 1).ToString))


Main.xaml (7.9 KB)

Try this:
[name of your datatable].Select("[column name] = ‘N/A’")

Hi… once the data is in your datatable, you can use datatable functions to get your data filtered.

Use an assign activity. Under the value property, Mention the below code

dt_Datatable.Select("ColumnName = 'N/A'")

If you have multiple conditions, all can be included there within the “” segment :slight_smile:

Hope it helps