After applying the filter on excel, I want to delete the the filtered column

I am a beginner, After applying the filter on excel, I want to delete the filtered columns data but I either end up deleting the whole colmn or rows after filtering. Any help would be greatly appriciated. I want to delete the data in the column after filtering the column.

So under the district column I want to delete the highlighted values in that column after filtering. Just delete in that column and not the whole column itself.

Hi @lalitrocks.akshana

Do you want delete the filtered columns or rows

I want to delete the data after filtering the column. :slight_smile:

@lalitrocks.akshana

Using filter, you able to filter the columns, After filteration The data in the rows will hide and then use delete rows and then select hidden rows.

Hope it helps!!

Hi @lalitrocks.akshana

You can use Filter DataTable Activity

I apologise, I think I could have been more clear. I want to delete the data in the column after filtering the column. :grinning: without deleting datas in the other columns or deleting all data from that particular column

Hi @lalitrocks.akshana

Can you show us a dummy dataTable and explain it like what you want to remove and what you don’t want to remove



I want to be able to delete just the highlighted portion after filtering :slight_smile:

Hi @lalitrocks.akshana

  1. Take Read Range Activity= Output DT as DataTable
  2. Take Assign Activity and use below expression.

DT.AsEnumerable().Where(Function(row) If(row(“District”).GetType() Is GetType(String), Not row.Field(Of String)(“District”).StartsWith(“169”), True) AndAlso If(row(“District”).GetType() Is GetType(Double), Not row.Field(Of Double)(“District”).ToString().StartsWith(“169”), True)).CopyToDataTable()

For Reference you can check below images.

INPUT
image

OUTPUT
image

Hope it will helps you :slight_smile:
Cheers!!

@lalitrocks.akshana

YourDataTable.AsEnumerable().Where(Function(row) row("District").ToString() = "HighlightedValue").ToList().ForEach(Sub(row) row("District") = String.Empty)

cheers…!