Experimente:
Sub transpondo_Chuvas()
Dim x As Long, lRow As Long
Dim iMes As Integer, iAno As Integer, iDia As Integer
Dim dData As Date
y = 2
With Sheets("Chuvas")
lRow = .Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = 2 To lRow
iMes = Month(.Cells(x, 1)): iAno = Year(.Cells(x, 1))
For Z = 2 To 32
iDia = Right(.Cells(1, Z), 2)
dData = DateSerial(iAno, iMes, iDia)
If Month(dData) = iMes Then
Sheets("Plan1").Cells(y, 1) = dData
Sheets("Plan1").Cells(y, 2) = .Cells(x, Z)
y = y + 1
End If
Next
Next
End With
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 17/02/2016 11:57 am