Macro para pegar datos en un libro y hoja especifica
Tengo una macro que realiza 3 sumas, los criterios son
Magna
Premium
Diesel
Sub Cierredemes()
'inicializo la variable resultado
Application.DisplayAlerts = False
 ActiveSheet.Columns("D:D").TextToColumns _
 Destination:=Range("J1"), _
 DataType:=xlDelimited, _
 ConsecutiveDelimiter:=True, _
 Other:=True, _
 OtherChar:=" "
 Application.DisplayAlerts = True
Range("K:K").Copy Range("D:D")
RESULTADOM = 0
 ultimafila = Cells(Application.Rows.Count, 4).End(xlUp).Row
 'comienzo el bucle
 For i = 1 To ultimafila
 If Cells(i, 4) = "MAGNA" Then 'criterio qeu debe cumplir
 'sumo sólo los valores que cumplen el criterio
 'y voy sumando acumuladamente a lo anterior.
 RESULTADOM = RESULTADOM + Cells(i, 6)
 End If
 Next
 Range("E65536").End(xlUp).Activate
 ActiveCell.Offset(3, 0).Select
 ActiveCell.Value = RESULTADOM
 ActiveCell.Offset(0, -1).Select
 ActiveCell.Value = "MAGNA"
 ActiveCell.Offset(1, 0).Select
 ActiveCell.Value = "PREMIUM"
 ActiveCell.Offset(0, 1).Select
RESULTADOP = 0
 For i = 1 To ultimafila
 If Cells(i, 4) = "PREMIUM" Then 'criterio qeu debe cumplir
 'sumo sólo los valores que cumplen el criterio
 'y voy sumando acumuladamente a lo anterior.
 RESULTADOP = RESULTADOP + Cells(i, 6)
 End If
 Next
 ActiveCell.Value = RESULTADOP
 ActiveCell.Offset(1, 0).Select
 RESULTADOD = 0
 For i = 1 To ultimafila
 If Cells(i, 4) = "DIESEL" Then 'criterio que debe cumplir
 'sumo sólo los valores que cumplen el criterio
 'y voy sumando acumuladamente a lo anterior.
 RESULTADOD = RESULTADOD + Cells(i, 6)
 End If
 Next
 ActiveCell.Value = RESULTADOD
 ActiveCell.Offset(0, -1).Select
 ActiveCell.Value = "DIESEL"
End Sub
, determino la ultima fila y en base a ello me desplazo hacia abajo para poner mi resultados en Hoja Activa, pero en lugar de ello, quiero pegar los resultados en un archivo llamado Ventas Enero 2016 y dentro de este libro que me busque la hoja del mes mayor, ya que en este libro tengo Ene, Feb, Mar, Abr y así sucesivamente por ejm al día de hoy necesito que me busque archivo "Ventas Enero 2016", Hoja Oct, que la suma de lo que dice Magna que lo ponga en J23


