Boa noite!!
Use o GM
Sub Macro1()
'
' Macro1 Macro
' Use o Gravador de Macro!!!
'
application.ScreenUpdating = 0
Range("B6:H6").Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(R4C,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
Range("B9:H9").Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(R7C,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
Range("B12:H12").Select
Range(Selection, Selection.end(xlToRight)).Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(R10C,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
Range("B15:H15").Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(#REF!,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
Range("B18:H18").Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(R16C,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
ActiveWindow.SmallScroll Down:=15
Range("B21:C21").Select
Selection.FormulaR1C1 = _
"=IFERROR(INDEX(COMPROMISSOS!R2C2:R9000C2,MATCH(R19C,COMPROMISSOS!R2C6:R9000C6,0)),"""")"
ActiveWindow.SmallScroll Down:=-21
With activesheet
.Range("B6:H6").value = .Range("B6:H6").value
.Range("B9:H9").value = .Range("B9:H9").value
.Range("B12:H12").value = .Range("B12:H12").value
.Range("B15:H15").value = .Range("B15:H15").value
.Range("B18:H18").value = .Range("B18:H18").value
.Range("B21:C21").value = .Range("B21:C21").value
End With
Range("A1").Select
application.ScreenUpdating = 1
End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 16/02/2015 3:41 pm