How can I do to assign the value to my cell according to the "SUM" function (present in another Workbook)
VBA Code:
Set sh = Workbooks("EEC QEC.xlsm").Worksheets(counter2)
Code:
k = Workbooks("EEC QEC.xlsm").Sheets("QEC 1.2 - montagem").Cells(Rows.Count, "H").End(xlUp).Offset(1).Row
VBA Code:
Workbooks("EEC QEC.xlsm").Sheets("2021").Cells(k, counter).Value = Application.WorksheetFunction.Sum(sh.Range("H & k:I & k"))