How to create a loop clicking through worksheets in excel

I need help creating a loop clicking through sheets in a workbook while searching for a cell value and counting anytime its found.


In excel scope activity, you have the optional output variable Workbook, in this variable you can loop the sheets names using like this varWorkbook.GetSheets.

1 Like

HI @bcorrea
how do i get to use it with Find and Replace in excel

Try this…and let me know if you have any more questions.Sequence.xaml (10.9 KB)

1 Like

Do you want to find the value of the cell in the sheet and replace it with a new value?

1 Like

Good evening John,

Does this solution resolve your issue?

1 Like

I want to open a workbook search for a variable cell value, if found add it to a counter then move to the next sheet, if not found move to the next sheet

does this solve your issue? replace the hardcoded string in the if condition with the variableSequence.xaml (10.9 KB)

1 Like

YES it does

Thanks @Imran_Khan

Please i also want to search for a variable value in a worksheet and copy the row and paste some of the deatails in another sheet of a different workbook?

@Imran_Khan @chenderson @bcorrea

add the excels to their respective datatables and move the row as you want

you mean by creating a new datatable

use read range to create the datatables

also can you share the step by process you want to do with the excel files also share the excel files if possible and i can just make something for you

Here’s the step by step process:

Open excel file, search for a variable number(using Find & replace), copy the row in which the variable is found then paste it in a datatable then paste some row items in different cells in another sheet of another excel file

Here you goSequence.xaml (11.7 KB)

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