Arkadaşlar, çalışmalarınızda başarılar dilerim. Aşağıdaki kodların açıklaması, eğer hücreler eşit ise belirlenen hücre bilgilerini aktar.
Sorum şöyle;
1- Aktarılan hücre aralığında =TOPLA förmülü var, bu formülün bozulmasını istemiyorum. Bunun için kodlarda nasıl bir düzenleme yapabilirim.
2- Kırmızı ile belirlenen kodda aktarma yapmıyor. Acaba If Then sayısı fazla olduğu için olabilirmi.
Saygılarımla. :hey:
For c = 5 To 23
If Cells(2, 2) = Cells(2, 20) Then Cells(c, 2) = Cells(c, 17): Cells(c, 3) = Cells(c, 18): Cells(c, 4) = Cells(c, 19)
If Cells(2, 2) = Cells(2, 23) Then Cells(c, 2) = Cells(c, 20): Cells(c, 3) = Cells(c, 21): Cells(c, 4) = Cells(c, 22)
If Cells(2, 2) = Cells(2, 26) Then Cells(c, 2) = Cells(c, 23): Cells(c, 3) = Cells(c, 24): Cells(c, 4) = Cells(c, 25)
If Cells(2, 2) = Cells(2, 29) Then Cells(c, 2) = Cells(c, 26): Cells(c, 3) = Cells(c, 27): Cells(c, 4) = Cells(c, 28)
If Cells(2, 2) = Cells(2, 32) Then Cells(c, 2) = Cells(c, 29): Cells(c, 3) = Cells(c, 30): Cells(c, 4) = Cells(c, 31)
If Cells(2, 2) = Cells(2, 35) Then Cells(c, 2) = Cells(c, 32): Cells(c, 3) = Cells(c, 33): Cells(c, 4) = Cells(c, 34)
If Cells(2, 2) = Cells(2, 38) Then Cells(c, 2) = Cells(c, 35): Cells(c, 3) = Cells(c, 36): Cells(c, 4) = Cells(c, 37)
If Cells(2, 2) = Cells(2, 41) Then Cells(c, 2) = Cells(c, 38): Cells(c, 3) = Cells(c, 39): Cells(c, 4) = Cells(c, 40)
If Cells(2, 2) = Cells(2, 44) Then Cells(c, 2) = Cells(c, 41): Cells(c, 3) = Cells(c, 42): Cells(c, 4) = Cells(c, 43)
If Cells(2, 2) = Cells(2, 47) Then Cells(c, 2) = Cells(c, 44): Cells(c, 3) = Cells(c, 45): Cells(c, 4) = Cells(c, 46)
If Cells(2, 2) = Cells(2, 50) Then Cells(c, 2) = Cells(c, 47): Cells(c, 3) = Cells(c, 48): Cells(c, 4) = Cells(c, 49)
If Cells(2, 2) = Cells(2, 53) Then Cells(c, 2) = Cells(c, 50): Cells(c, 3) = Cells(c, 51): Cells(c, 4) = Cells(c, 52)If Cells(2, 2) = Cells(2, 56) Then Cells(c, 2) = Cells(c, 53): Cells(c, 3) = Cells(c, 54): Cells(c, 4) = Cells(c, 55)
If Cells(2, 2) = Cells(2, 59) Then Cells(c, 2) = Cells(c, 56): Cells(c, 3) = Cells(c, 57): Cells(c, 4) = Cells(c, 58)
If Cells(2, 2) = Cells(2, 62) Then Cells(c, 2) = Cells(c, 59): Cells(c, 3) = Cells(c, 60): Cells(c, 4) = Cells(c, 61)
If Cells(2, 2) = Cells(2, 65) Then Cells(c, 2) = Cells(c, 62): Cells(c, 3) = Cells(c, 63): Cells(c, 4) = Cells(c, 64)
If Cells(2, 2) = Cells(2, 68) Then Cells(c, 2) = Cells(c, 65): Cells(c, 3) = Cells(c, 66): Cells(c, 4) = Cells(c, 67)
If Cells(2, 2) = Cells(2, 71) Then Cells(c, 2) = Cells(c, 68): Cells(c, 3) = Cells(c, 69): Cells(c, 4) = Cells(c, 70)
If Cells(2, 2) = Cells(2, 74) Then Cells(c, 2) = Cells(c, 71): Cells(c, 3) = Cells(c, 72): Cells(c, 4) = Cells(c, 73)
If Cells(2, 2) = Cells(2, 77) Then Cells(c, 2) = Cells(c, 74): Cells(c, 3) = Cells(c, 75): Cells(c, 4) = Cells(c, 76)
If Cells(2, 2) = Cells(2, 80) Then Cells(c, 2) = Cells(c, 77): Cells(c, 3) = Cells(c, 78): Cells(c, 4) = Cells(c, 79)
If Cells(2, 2) = Cells(2, 83) Then Cells(c, 2) = Cells(c, 80): Cells(c, 3) = Cells(c, 81): Cells(c, 4) = Cells(c, 82)
If Cells(2, 2) = Cells(2, 86) Then Cells(c, 2) = Cells(c, 83): Cells(c, 3) = Cells(c, 84): Cells(c, 4) = Cells(c, 85)
If Cells(2, 2) = Cells(2, 89) Then Cells(c, 2) = Cells(c, 86): Cells(c, 3) = Cells(c, 87): Cells(c, 4) = Cells(c, 88)
If Cells(2, 2) = Cells(2, 92) Then Cells(c, 2) = Cells(c, 89): Cells(c, 3) = Cells(c, 90): Cells(c, 4) = Cells(c, 91)
If Cells(2, 2) = Cells(2, 95) Then Cells(c, 2) = Cells(c, 92): Cells(c, 3) = Cells(c, 93): Cells(c, 4) = Cells(c, 94)
If Cells(2, 2) = Cells(2, 98) Then Cells(c, 2) = Cells(c, 95): Cells(c, 3) = Cells(c, 96): Cells(c, 4) = Cells(c, 97)
If Cells(2, 2) = Cells(2, 101) Then Cells(c, 2) = Cells(c, 98): Cells(c, 3) = Cells(c, 99): Cells(c, 4) = Cells(c, 100)
If Cells(2, 2) = Cells(2, 104) Then Cells(c, 2) = Cells(c, 101): Cells(c, 3) = Cells(c, 102): Cells(c, 4) = Cells(c, 103)
If Cells(2, 2) = Cells(2, 107) Then Cells(c, 2) = Cells(c, 104): Cells(c, 3) = Cells(c, 105): Cells(c, 4) = Cells(c, 106)
If Cells(2, 2) = Cells(2, 110) Then Cells(c, 2) = Cells(c, 107): Cells(c, 3) = Cells(c, 108): Cells(c, 4) = Cells(c, 109)
If Cells(2, 2) = Cells(2, 113) Then Cells(c, 2) = Cells(c, 110): Cells(c, 3) = Cells(c, 111): Cells(c, 4) = Cells(c, 112)
If Cells(2, 2) = Cells(2, 116) Then Cells(c, 2) = Cells(c, 113): Cells(c, 3) = Cells(c, 114): Cells(c, 4) = Cells(c, 115)
If Cells(2, 2) = Cells(2, 119) Then Cells(c, 2) = Cells(c, 116): Cells(c, 3) = Cells(c, 117): Cells(c, 4) = Cells(c, 118)
If Cells(2, 2) = Cells(2, 122) Then Cells(c, 2) = Cells(c, 119): Cells(c, 3) = Cells(c, 120): Cells(c, 4) = Cells(c, 121)
Next c
Sorum şöyle;
1- Aktarılan hücre aralığında =TOPLA förmülü var, bu formülün bozulmasını istemiyorum. Bunun için kodlarda nasıl bir düzenleme yapabilirim.
2- Kırmızı ile belirlenen kodda aktarma yapmıyor. Acaba If Then sayısı fazla olduğu için olabilirmi.
Saygılarımla. :hey:
For c = 5 To 23
If Cells(2, 2) = Cells(2, 20) Then Cells(c, 2) = Cells(c, 17): Cells(c, 3) = Cells(c, 18): Cells(c, 4) = Cells(c, 19)
If Cells(2, 2) = Cells(2, 23) Then Cells(c, 2) = Cells(c, 20): Cells(c, 3) = Cells(c, 21): Cells(c, 4) = Cells(c, 22)
If Cells(2, 2) = Cells(2, 26) Then Cells(c, 2) = Cells(c, 23): Cells(c, 3) = Cells(c, 24): Cells(c, 4) = Cells(c, 25)
If Cells(2, 2) = Cells(2, 29) Then Cells(c, 2) = Cells(c, 26): Cells(c, 3) = Cells(c, 27): Cells(c, 4) = Cells(c, 28)
If Cells(2, 2) = Cells(2, 32) Then Cells(c, 2) = Cells(c, 29): Cells(c, 3) = Cells(c, 30): Cells(c, 4) = Cells(c, 31)
If Cells(2, 2) = Cells(2, 35) Then Cells(c, 2) = Cells(c, 32): Cells(c, 3) = Cells(c, 33): Cells(c, 4) = Cells(c, 34)
If Cells(2, 2) = Cells(2, 38) Then Cells(c, 2) = Cells(c, 35): Cells(c, 3) = Cells(c, 36): Cells(c, 4) = Cells(c, 37)
If Cells(2, 2) = Cells(2, 41) Then Cells(c, 2) = Cells(c, 38): Cells(c, 3) = Cells(c, 39): Cells(c, 4) = Cells(c, 40)
If Cells(2, 2) = Cells(2, 44) Then Cells(c, 2) = Cells(c, 41): Cells(c, 3) = Cells(c, 42): Cells(c, 4) = Cells(c, 43)
If Cells(2, 2) = Cells(2, 47) Then Cells(c, 2) = Cells(c, 44): Cells(c, 3) = Cells(c, 45): Cells(c, 4) = Cells(c, 46)
If Cells(2, 2) = Cells(2, 50) Then Cells(c, 2) = Cells(c, 47): Cells(c, 3) = Cells(c, 48): Cells(c, 4) = Cells(c, 49)
If Cells(2, 2) = Cells(2, 53) Then Cells(c, 2) = Cells(c, 50): Cells(c, 3) = Cells(c, 51): Cells(c, 4) = Cells(c, 52)If Cells(2, 2) = Cells(2, 56) Then Cells(c, 2) = Cells(c, 53): Cells(c, 3) = Cells(c, 54): Cells(c, 4) = Cells(c, 55)
If Cells(2, 2) = Cells(2, 59) Then Cells(c, 2) = Cells(c, 56): Cells(c, 3) = Cells(c, 57): Cells(c, 4) = Cells(c, 58)
If Cells(2, 2) = Cells(2, 62) Then Cells(c, 2) = Cells(c, 59): Cells(c, 3) = Cells(c, 60): Cells(c, 4) = Cells(c, 61)
If Cells(2, 2) = Cells(2, 65) Then Cells(c, 2) = Cells(c, 62): Cells(c, 3) = Cells(c, 63): Cells(c, 4) = Cells(c, 64)
If Cells(2, 2) = Cells(2, 68) Then Cells(c, 2) = Cells(c, 65): Cells(c, 3) = Cells(c, 66): Cells(c, 4) = Cells(c, 67)
If Cells(2, 2) = Cells(2, 71) Then Cells(c, 2) = Cells(c, 68): Cells(c, 3) = Cells(c, 69): Cells(c, 4) = Cells(c, 70)
If Cells(2, 2) = Cells(2, 74) Then Cells(c, 2) = Cells(c, 71): Cells(c, 3) = Cells(c, 72): Cells(c, 4) = Cells(c, 73)
If Cells(2, 2) = Cells(2, 77) Then Cells(c, 2) = Cells(c, 74): Cells(c, 3) = Cells(c, 75): Cells(c, 4) = Cells(c, 76)
If Cells(2, 2) = Cells(2, 80) Then Cells(c, 2) = Cells(c, 77): Cells(c, 3) = Cells(c, 78): Cells(c, 4) = Cells(c, 79)
If Cells(2, 2) = Cells(2, 83) Then Cells(c, 2) = Cells(c, 80): Cells(c, 3) = Cells(c, 81): Cells(c, 4) = Cells(c, 82)
If Cells(2, 2) = Cells(2, 86) Then Cells(c, 2) = Cells(c, 83): Cells(c, 3) = Cells(c, 84): Cells(c, 4) = Cells(c, 85)
If Cells(2, 2) = Cells(2, 89) Then Cells(c, 2) = Cells(c, 86): Cells(c, 3) = Cells(c, 87): Cells(c, 4) = Cells(c, 88)
If Cells(2, 2) = Cells(2, 92) Then Cells(c, 2) = Cells(c, 89): Cells(c, 3) = Cells(c, 90): Cells(c, 4) = Cells(c, 91)
If Cells(2, 2) = Cells(2, 95) Then Cells(c, 2) = Cells(c, 92): Cells(c, 3) = Cells(c, 93): Cells(c, 4) = Cells(c, 94)
If Cells(2, 2) = Cells(2, 98) Then Cells(c, 2) = Cells(c, 95): Cells(c, 3) = Cells(c, 96): Cells(c, 4) = Cells(c, 97)
If Cells(2, 2) = Cells(2, 101) Then Cells(c, 2) = Cells(c, 98): Cells(c, 3) = Cells(c, 99): Cells(c, 4) = Cells(c, 100)
If Cells(2, 2) = Cells(2, 104) Then Cells(c, 2) = Cells(c, 101): Cells(c, 3) = Cells(c, 102): Cells(c, 4) = Cells(c, 103)
If Cells(2, 2) = Cells(2, 107) Then Cells(c, 2) = Cells(c, 104): Cells(c, 3) = Cells(c, 105): Cells(c, 4) = Cells(c, 106)
If Cells(2, 2) = Cells(2, 110) Then Cells(c, 2) = Cells(c, 107): Cells(c, 3) = Cells(c, 108): Cells(c, 4) = Cells(c, 109)
If Cells(2, 2) = Cells(2, 113) Then Cells(c, 2) = Cells(c, 110): Cells(c, 3) = Cells(c, 111): Cells(c, 4) = Cells(c, 112)
If Cells(2, 2) = Cells(2, 116) Then Cells(c, 2) = Cells(c, 113): Cells(c, 3) = Cells(c, 114): Cells(c, 4) = Cells(c, 115)
If Cells(2, 2) = Cells(2, 119) Then Cells(c, 2) = Cells(c, 116): Cells(c, 3) = Cells(c, 117): Cells(c, 4) = Cells(c, 118)
If Cells(2, 2) = Cells(2, 122) Then Cells(c, 2) = Cells(c, 119): Cells(c, 3) = Cells(c, 120): Cells(c, 4) = Cells(c, 121)
Next c