vineelag
(vineetha)
May 9, 2024, 2:48am
1
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!!!
Yoichi
(Yoichi)
May 9, 2024, 3:12am
2
HI,
If possible, can you share sample input as file? It’s no problem if dummy data.
Regards,
vineelag
(vineetha)
May 9, 2024, 3:32am
3
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!!!
vineelag
(vineetha)
May 9, 2024, 3:45am
4
please kindly find the above file and it should tell “CONV ASSY-CAT” its contains this word or not
@Yoichi
Yoichi
(Yoichi)
May 9, 2024, 3:48am
5
Hi,
Thank you for sharing, but it’s protected file. Can you also share password or unprotected file?
Regards,
Anil_G
(Anil Gorthi)
May 9, 2024, 4:02am
6
@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:
Output:
Thanks,
Ashok
1 Like
vineelag
(vineetha)
May 9, 2024, 4:20am
9
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
vineelag
(vineetha)
May 9, 2024, 4:31am
11
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:
Output:
Thanks,
Ashok
1 Like
vineelag
(vineetha)
May 9, 2024, 5:16am
13
Thank you @ashokkarale
can you share this file with me!!
Yoichi
(Yoichi)
May 9, 2024, 5:18am
14
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
Thanks,
Ashok
1 Like
vineelag
(vineetha)
May 9, 2024, 5:24am
16
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
vineelag
(vineetha)
May 9, 2024, 5:26am
17
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.
Yoichi
(Yoichi)
May 9, 2024, 5:44am
18
Hi,
How about the following?
Sample
Sample20240509-2 (3).zip (74.4 KB)
Regards,
1 Like
vineelag
(vineetha)
May 9, 2024, 8:15am
19
Its working, Thank you @Yoichi
1 Like
system
(system)
Closed
May 12, 2024, 8:16am
20
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.