Filter column that contain key words

excel

#1

Hi,

Anyone can guide me on how to filter the column, Campaign Name which contains the key words, xox and remove the rest of row?

From:

Id Campaign Name Status Creation Date
1 Au_xox_abd_fopd Pending 2/21/2018
2 Us_xox_hbd_suif Run 3/5/2018
3 Us_aba_cgd_ddfef Run 5/6/2018
4 Us_aba_sdf_ajdo Pending 3/21/2017
5 Us_xox_dsf_aet Run 4/16/2016

To:

Id Campaign Name Status Creation Date
1 Us_xox_abd_fopd Pending 2/21/2018
2 Us_xox_hbd_suif Run 3/5/2018
5 Us_xox_dsf_aet Run 4/16/2016

Thank you.


#2

Hi @Katyy1,

dtNew=dt.select("[Campaign Name] like ‘%xox%’").Copytodatatable

Revert if this is not sufficient.

Regards,
SP


#3

Hi @SantoshPothina,

Thanks for your quick feedback!

I’ve tried it but it shows an error of Assign: Cannot find column [’]. I’ve also shared my workflow for your reference. Please advice.

Thanks in advance!


#4

@Katyy1
In the read range activity properties check the Add headers property.
image


#5

Thanks @Madhavi,

Yes, the Add Headers option is checked. But it still show the same error.


#6

Hi @Katyy1,

in that excel sheet verify the Campaign Name header is there or not.

Regards,
Arivu


#7

Hi @arivu96,

May I know how to verify the header in excel sheet? Thanks.


#8

Campaign Name check whether having any space before and after.

Regards,
Arivu


#9

Hi @Katyy1,

use this code
dtNew=dt.select("[Campaign Name] like '%xox%'").Copytodatatable()

Regards,
Arivu


#10

Hi @Katyy1,

you might stuck because of this invalid character " ‘ " instead of " ’ ". Its better you type the whole line again from your keyboard.

Regards,
SP


#11

Thank you all, it works now.