Recupere valores a partir de fórmulas das Abas:
Sub FindFormulaSheets()Dim sh As WorksheetDim f As RangeDim sWorksheets("Total").Range("A2:B100").ClearContentsApplication.ScreenUpdating = FalseLet s = "=SUM(D2:D6)"For Each sh In ActiveWorkbook.WorksheetsIf sh.Name <> ("Total") ThenSet f = sh.Cells.Find(s, LookIn:=xlFormulas)If Not f Is Nothing ThenRange("A65536").End(xlUp).Offset(1, 0) = sh.NameWorksheets("Total").Range("A65536").End(xlUp).Offset(0, 1) = Format(f, "h:mm;@")Let Application.ScreenUpdating = TrueEnd IfEnd IfNext sh
Worksheets("Total").ActivateEnd Sub
Tags: Excel, VBA, Loop, Sheets, recupere, valor, fórmula, Aba, get, value, ,formula, sheet,
Nenhum comentário:
Postar um comentário