Excel and need to find the string is present on not

Hi All,

I have a excel you can see below and need to find the word “CONV ASSY-CAT” at PART NAME

EXCEL

But word is place in multiple columns as you can see in the excel yellow highlighted and at top of the excel also you can see in this case how can i achieve this.

@Yoichi

Thank you!!!

HI,

If possible, can you share sample input as file? It’s no problem if dummy data.

Regards,

please find the above file

Please kindly let me know which method is make it simple regex or link or another method.

@Yoichi Thank you!!!

please kindly find the above file and it should tell “CONV ASSY-CAT” its contains this word or not

@Yoichi

Hi,

Thank you for sharing, but it’s protected file. Can you also share password or unprotected file?

Regards,

@vineelag

Just use find/replace activity and you can find the value you need…if Response output is IsNothing then no value found else it is found and you would have the cell number too

Cheers

1 Like

@vineelag,

Use Find/Replace Value activity like this.

Input:
image

Output:

Thanks,
Ashok :slight_smile:

1 Like

Thank you so much @ashokkarale

please check the file which I shared above and if there is any solution please kindly let me know.

we need to find this word in excel CONV ASSY-CAT and this word in multiple cell. I am requesting you please gone through the file which i shared above its not in normal excel format.

Once again thank you @ashokkarale !!!

@vineelag,

You should be changing C column to U column in my code and you should be good.

Thanks,
Ashok :slight_smile:

if the column is dynamic some times its v and sometimes u or x or s what should i do in this case.

Thank you!!!

@ashokkarale

@vineelag,

In that case use two Find/Replace activities.

One for Finding the column and one for finding the value in the column like this.

Code:

Regex to get Column letter from range.

System.Text.RegularExpressions.Regex.Match(strSource,"[A-Z]").Tostring

Input:
image

Output:
image

Thanks,
Ashok :slight_smile:

1 Like

Thank you @ashokkarale
can you share this file with me!!

Hi,

Can you try the following sample?
This will check multiple column which is set in arrTargetColumn variable.

dr = dt.AsEnumerable.Where(Function(r) arrTargetColumn.Any(Function(s) r("Column"+UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex(s).ToString).ToString.Contains("CONV ASSY-CAT"))).FirstOrDefault

Sample
Sample20240509-2 (2).zip (74.4 KB)

Regards,

1 Like

@vineelag,

Here you go.
Demo.xlsx (9.0 KB)
Main.xaml (15.1 KB)

Don’t forget to mark the answer as solution so it will be helpful to other members as well :smiley:

Thanks,
Ashok :slight_smile:

1 Like

sure will do,

But the first row value placed in T column and remaining values there in column u, Because now i got another update that i need to find these string values “CAT” or “catalyst” if any one is there i will consider it as yes.

so Please confirm on it.

thankyou @ashokkarale

thank you so much @Yoichi

But just know i got an update that i need to find these string values “CAT” or “catalyst” if any one is there i will consider it as yes.

for this above case what the changes i need to do, Please kindly let me know.

Hi,

How about the following?

Sample
Sample20240509-2 (3).zip (74.4 KB)

Regards,

1 Like

Its working, Thank you @Yoichi

1 Like

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