I have two workbooks, some sheets have the same name. I would like to export (copy) some data from sheet A in Workbook TeamINSO to this workbook (where the code is) to the sheet with the same name and I'm stuck. How to write: loop through sheets in workbook TeamINSO, if sheet name equals a sheet name in this workbook, then copy range?
For Each ws In TeamINSO.Worksheets
If ws.Name = ThisWorkbook.Worksheets(ws.Name) Then
Workbooks(TeamINSO).Worksheets(ws.Name).Range("A3:C400").Copy
ThisWorkbook.Worksheets(ws.Name).Range("A2").PasteSpecial xlPasteValues
Else
End If
Next ws
Thanks for helping.