Então use
Sub Insere()
Dim lRow As Long, lCol As Integer, nCol As Long, nRow As Long
lRow = Sheets("CAPA").Cells(Cells.Rows.Count, "A").End(xlUp).Row
lCol = Sheets("VALORES").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
nCol = Application.Match(Sheets("CAPA").Cells(1, 2), Sheets("Valores").Range("A1:NB1"), 0)
For i = 2 To lRow
nRow = Application.Match(Sheets("CAPA").Cells(i, 1).Value, Sheets("Valores").Range("A1:A36"), 0)
Sheets("Valores").Cells(nRow, nCol).Value = Sheets("CAPA").Cells(i, 2).Value
Next
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 24/08/2011 10:18 am