I am trying to search multiple sheets for a unique string. Please help.
Hi @scott.luntz
Refer the below thread for the same
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
Thank you however this only retrieves the sheet name. I am trying to search for a string that will be within the correct sheet even though there are multiple.
Hi @scott.luntz
So in this case follow the below steps :-
- Take Excel Application Scope Activity
- Within Excel Application scope take get workbook sheets Activity and create output variable
- Use for Each Activity and above output variable put in the For Each Activity
- Within For Each Activity take Read Range Activity and pass the item variable of For Each as a sheet name in Read range activity
- After that use If Activity and apply the condition that you are trying to find the particular string
In this way it will search that string within all Sheets of that same Excel
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
Thank you. What should be the condition for the if statement? How can I make the if statement so that it searches for the string. In addition, what should the else condition be? Thanks
Hi @scott.luntz
So before answering your If condition question i have few ques for u
-
May i know the string that you are searching in multiples sheets of Excel will be searched specifically in particular column or any thing else ??
-
Let me know the format of the data within Each excel sheet …
-
whether the format of data is same for all the Excel sheets ??
Can you give sample Excel file along with the string that you want to search ?
Happy Automation
Best Regards
Er Pratik Wavhal
I am searching this sheet:
Sample Sheet.xls (157 KB)
Within this sheet I am trying to select the column that begins with “Press Brand” However the sheet name will not always be the same. Thanks
Hi @scott.luntz
Below is the workflow for the same :-
MainPratik.xaml (19.0 KB)
Output :-
Mark as solution and like it
Happy Automation
Best Regards
Er Pratik Wavhal