Hi p45cal,

Thanks so much for helping out with this, and so quickly! I think I didn't explain very well however... the two sourcesheets are in different workbooks. I.e. each is a different file, and each is in sheet 1 of their respective workbooks.

I think with your previous comment, it will work with different sheets but not different workbooks.

Thanks again,

Olivier

Quote Originally Posted by p45cal View Post
Untested, just changing the for..next loop:
For Each FileName In SelectedFiles
  With Workbooks.Open(FileName)
    With .Worksheets(1)
      Intersect(.UsedRange, .Range("C:E,I:I")).Copy SummarySheet.Cells(NRow, 1)  ' can use this line instead of the 2 below - it copies everything, formats and all.
      'or these next 2 which copy over only the values (dates look ugly):
      'Intersect(.UsedRange, .Range("C:E,I:I")).Copy
      'SummarySheet.Cells(NRow, 1).PasteSpecial xlPasteValues
    End With '.Worksheets(1)
    With .Worksheets(2)
      Intersect(.UsedRange, .Range("B:B")).Copy SummarySheet.Cells(NRow, 6)  ' can use this line instead of the 2 below - it copies everything, formats and all.
      'or these next 2 which copy over only the values (dates look ugly):
      'Intersect(.UsedRange, .Range("B:B")).Copy
      'SummarySheet.Cells(NRow, 6).PasteSpecial xlPasteValues
      Intersect(.UsedRange, .Range("J:J")).Copy SummarySheet.Cells(NRow, 7)  ' can use this line instead of the 2 below - it copies everything, formats and all.
      'or these next 2 which copy over only the values (dates look ugly):
      'Intersect(.UsedRange, .Range("J:J")).Copy
      'SummarySheet.Cells(NRow, 7).PasteSpecial xlPasteValues
      Intersect(.UsedRange, .Range("H:H")).Copy SummarySheet.Cells(NRow, 8)  ' can use this line instead of the 2 below - it copies everything, formats and all.
      'or these next 2 which copy over only the values (dates look ugly):
      'Intersect(.UsedRange, .Range("H:H")).Copy
      'SummarySheet.Cells(NRow, 8).PasteSpecial xlPasteValues
      Intersect(.UsedRange, .Range("C:C")).Copy SummarySheet.Cells(NRow, 9)  ' can use this line instead of the 2 below - it copies everything, formats and all.
      'or these next 2 which copy over only the values (dates look ugly):
      'Intersect(.UsedRange, .Range("C:C")).Copy
      'SummarySheet.Cells(NRow, 9).PasteSpecial xlPasteValues

      'Application.CutCopyMode = False 'this line only needed when using the xlPasteValues lines above.
    End With '.Worksheets(2)
    .Parent.Close savechanges:=False
  End With  'Workbooks.Open(FileName)
.Worksheets(1) and .Worksheets(2) in the code above refer to the worksheets in the order they appear in in the workbook you're copying from. If they have consistent names then you can substitute .Worksheets("TheFirstSheet") and .Worksheets("SomeOtherSheet") obviously using the names of your actual worksheets instead.