Search for a String Across Multiple Sheets

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 :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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 :-

  1. Take Excel Application Scope Activity
  2. Within Excel Application scope take get workbook sheets Activity and create output variable
  3. Use for Each Activity and above output variable put in the For Each Activity
  4. Within For Each Activity take Read Range Activity and pass the item variable of For Each as a sheet name in Read range activity
  5. 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 :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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

  1. 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 ??

  2. Let me know the format of the data within Each excel sheet …

  3. 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 :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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 :-

image

image

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer: