Sub aktar()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Sayfa2.Range("M6:AQ17").ClearContents
For x = 1 To 31
For y = 10 To 13 'J=10, K=11, L=12, M=13. sütun
If y = 13 Then
deger = 8
Else
deger = 24
End If
tmp1 = Sayfa1.Cells(2 * x + 1, y) 'H3 H61 Arası 2 şer adımla ilerle
If tmp1 = "" Then GoTo atla
For Z = 6 To 17 'Puantaj sayfası personel sayısı 6. satır 17. satır
tmp2 = Sayfa2.Cells(Z, "K")
If tmp1 = tmp2 Then
Sayfa2.Cells(Z, x + 12) = deger
Exit For
End If
Next Z
atla:
tmp1 = Sayfa1.Cells(2 * x + 2, y) 'H3 H61 Arası 2 şer adımla ilerle
If tmp1 = "" Then GoTo atla2
For Z = 6 To 17 'Puantaj sayfası personel sayısı 6. satır 17. satır
tmp2 = Sayfa2.Cells(Z, "K")
If tmp1 = tmp2 Then
Sayfa2.Cells(Z, x + 12) = deger
Exit For
End If
Next Z
atla2:
Next y
Next x
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
..
... arkadaşlar bu koda göre 10,11,ve 12 sutunlar degeri aktarılırken 24 diye 13 sutundegeri aktarılırken 8 diye aktarılıyor benım bu kodda sadece 13 değilde 14 ve 15 sutunlarında 8 deger aktarması ıcın if ve else komutunu nasıl yapzarım
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Sayfa2.Range("M6:AQ17").ClearContents
For x = 1 To 31
For y = 10 To 13 'J=10, K=11, L=12, M=13. sütun
If y = 13 Then
deger = 8
Else
deger = 24
End If
tmp1 = Sayfa1.Cells(2 * x + 1, y) 'H3 H61 Arası 2 şer adımla ilerle
If tmp1 = "" Then GoTo atla
For Z = 6 To 17 'Puantaj sayfası personel sayısı 6. satır 17. satır
tmp2 = Sayfa2.Cells(Z, "K")
If tmp1 = tmp2 Then
Sayfa2.Cells(Z, x + 12) = deger
Exit For
End If
Next Z
atla:
tmp1 = Sayfa1.Cells(2 * x + 2, y) 'H3 H61 Arası 2 şer adımla ilerle
If tmp1 = "" Then GoTo atla2
For Z = 6 To 17 'Puantaj sayfası personel sayısı 6. satır 17. satır
tmp2 = Sayfa2.Cells(Z, "K")
If tmp1 = tmp2 Then
Sayfa2.Cells(Z, x + 12) = deger
Exit For
End If
Next Z
atla2:
Next y
Next x
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
..
... arkadaşlar bu koda göre 10,11,ve 12 sutunlar degeri aktarılırken 24 diye 13 sutundegeri aktarılırken 8 diye aktarılıyor benım bu kodda sadece 13 değilde 14 ve 15 sutunlarında 8 deger aktarması ıcın if ve else komutunu nasıl yapzarım
