Tevfik_Kursun
Altın Üye
- Katılım
- 30 Temmuz 2012
- Mesajlar
- 3,904
- Excel Vers. ve Dili
- Office 2016 Pro - Türkçe 64 Bit
Günaydın Arkadaşlar,
Bu makro aynı işlevi görmesi koşuluyla başka nasıl yazılabilir?
Saygılarımla
Ornek
Kod:
Sub Birlestir_1()
Range("Z3:AF14").ClearContents
For j = 1 To 12
For i = 5 To [C1] + 4
If Month(Cells(i, 8)) = j Then
metin = metin & Cells(i, 2)
End If
Next i
Cells(2 + j, 26) = j
Cells(2 + j, 27) = metin
If Cells(2 + j, 27) = "" Then
Cells(2 + j, 28) = ""
Else
Cells(2 + j, 28) = Len(metin) / 4
End If
If Cells(2 + j, 27) = "" Then
Cells(2 + j, 29) = ""
Else
If j = 1 Then
Cells(2 + j, 29) = 5
Else
Cells(2 + j, 29) = Cells(1 + j, 30) + 1
End If
End If
If Cells(2 + j, 27) = "" Then
Cells(2 + j, 30) = ""
Else
Cells(2 + j, 30) = Cells(2 + j, 28) + Cells(2 + j, 29) - 1
End If
If Cells(2 + j, 27) = "" Then
Cells(2 + j, 31) = ""
Else
Cells(2 + j, 31) = j
End If
If Cells(2 + j, 27) = "" Then
Cells(2 + j, 32) = ""
Else
Cells(2 + j, 32) = "B" & Cells(2 + j, 29) & ":P" & Cells(2 + j, 30)
End If
metin = Empty
Next j
End Sub
Saygılarımla
Ornek
