Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Sub Summary() 'Summarization macro - is searching for a specific cell in every workbook in the folder and sums it up in a predefined cell Dim wb As Workbook, TheFile As String Dim MyPath As String, TheSum As Double Dim MyArray As Variant MyArray = Array("CLOOS-1323.003", "CLOOS-1324.004", "CLOOS-1325.005") TheSum = 0 MyPath = ThisWorkbook.Path ChDir MyPath TheFile = Dir("*.xlsx") Do While TheFile <> "" If TheFile <> ThisWorkbook.Name Then Set wb = Workbooks.Open(MyPath & "\" & TheFile) TheSum = TheSum + Sheets("1630.001 Montáž koles.jednot.").Range("G12:028") wb.Close End If TheFile = Dir Loop Sheets(MyArray).Range("G12:028") = TheSum End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.