hücre renklendirme ve biçimli kopyalama

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
sorumu ekteki dosyada gönderiyorum.
aynı isme sahip hücrelerin aynı renk boyanmasını istiyorum ve mümkünse renk sıralamasını ben yapmak istiyorum.
ve diğer sayfada bir yere bu renkli hücrelerden birindeki veriyi çağırdığım zaman biçimleri ile beraber gelmeli

şimdiden teşekkürler
 

Ekli dosyalar

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
hımmmm.... incelenmeli...
sonuç alamazsam dönerim tekrar.
teşekkürler
 

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
sayın yurttas,
ilgili link i inceledim ama bazı dosyaları yükleyemediğim için tam cevabımı bulamadım.
a sütunundaki değerlere göre A dan E sütununa kadar aynı renklendirmeyi yapmak ve bu değerleri başka bir sayfaya =Sayfa1!A2 ile çektiğim zaman Sayfa 1 deki A2 hücresini biçimleri ile birlikte getirmeli.
ilgili linkten aşağıdaki kodu aldım ama

Sat = "A" & Target.Row & ":E" & Target.Row

kısmı için hata veriyor.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error Resume Next
If Intersect(Target, [A:A]) Is Nothing Then Exit Sub
Sat = "A" & Target.Row & ":E" & Target.Row
Select Case Target
Case "": Range(Sat).Interior.ColorIndex = 0
Case Is = "1": Range(Sat).Interior.ColorIndex = 1
Case Is = "2": Range(Sat).Interior.ColorIndex = 2
Case Is = "3": Range(Sat).Interior.ColorIndex = 3
Case Is = "4": Range(Sat).Interior.ColorIndex = 4
Case Is = "5": Range(Sat).Interior.ColorIndex = 5
Case Is = "6": Range(Sat).Interior.ColorIndex = 6
Case Is = "7": Range(Sat).Interior.ColorIndex = 7
Case Is = "8": Range(Sat).Interior.ColorIndex = 6
Case Is = "9": Range(Sat).Interior.ColorIndex = 9
Case Is = "10": Range(Sat).Interior.ColorIndex = 10
Case Is = "11": Range(Sat).Interior.ColorIndex = 11
Case Is = "12": Range(Sat).Interior.ColorIndex = 12
Case Is = "13": Range(Sat).Interior.ColorIndex = 13
Case Is = "14": Range(Sat).Interior.ColorIndex = 14
Case Is = "15": Range(Sat).Interior.ColorIndex = 15
Case Is = "16": Range(Sat).Interior.ColorIndex = 16
Case Is = "17": Range(Sat).Interior.ColorIndex = 17
Case Is = "18": Range(Sat).Interior.ColorIndex = 18
Case Is = "19": Range(Sat).Interior.ColorIndex = 19
Case Is = "20": Range(Sat).Interior.ColorIndex = 20
Case Is = "21": Range(Sat).Interior.ColorIndex = 21
Case Is = "22": Range(Sat).Interior.ColorIndex = 22
Case Is = "23": Range(Sat).Interior.ColorIndex = 23
Case Is = "24": Range(Sat).Interior.ColorIndex = 24
Case Is = "25": Range(Sat).Interior.ColorIndex = 25
Case Is = "26": Range(Sat).Interior.ColorIndex = 26
Case Is = "27": Range(Sat).Interior.ColorIndex = 27
Case Is = "28": Range(Sat).Interior.ColorIndex = 28
Case Is = "29": Range(Sat).Interior.ColorIndex = 29
Case Is = "30": Range(Sat).Interior.ColorIndex = 30
Case Is = "31": Range(Sat).Interior.ColorIndex = 31
Case Is = "32": Range(Sat).Interior.ColorIndex = 32
Case Is = "33": Range(Sat).Interior.ColorIndex = 33
Case Is = "34": Range(Sat).Interior.ColorIndex = 34
Case Is = "35": Range(Sat).Interior.ColorIndex = 35
Case Is = "36": Range(Sat).Interior.ColorIndex = 36
Case Is = "37": Range(Sat).Interior.ColorIndex = 37
Case Is = "38": Range(Sat).Interior.ColorIndex = 38
Case Is = "39": Range(Sat).Interior.ColorIndex = 39
Case Is = "40": Range(Sat).Interior.ColorIndex = 40
Case Is = "41": Range(Sat).Interior.ColorIndex = 41
Case Is = "42": Range(Sat).Interior.ColorIndex = 42
Case Is = "43": Range(Sat).Interior.ColorIndex = 43
Case Is = "44": Range(Sat).Interior.ColorIndex = 44
Case Is = "45": Range(Sat).Interior.ColorIndex = 45
Case Is = "46": Range(Sat).Interior.ColorIndex = 46
Case Is = "47": Range(Sat).Interior.ColorIndex = 47
Case Is = "48": Range(Sat).Interior.ColorIndex = 48
Case Is = "49": Range(Sat).Interior.ColorIndex = 49
Case Is = "50": Range(Sat).Interior.ColorIndex = 50
Case Is = "51": Range(Sat).Interior.ColorIndex = 51
Case Is = "52": Range(Sat).Interior.ColorIndex = 52
Case Is = "53": Range(Sat).Interior.ColorIndex = 53
Case Is = "54": Range(Sat).Interior.ColorIndex = 54
Case Is = "55": Range(Sat).Interior.ColorIndex = 55
Case Is = "56": Range(Sat).Interior.ColorIndex = 56

End Select

End Sub
 

Merhum İdris SERDAR

Moderatör
Yönetici
Katılım
21 Ekim 2005
Mesajlar
17,094
Excel Vers. ve Dili
Excel, 365 - İngilizce
Kodları aşağıdaki şekilde deneyin.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error Resume Next
If Intersect(Target, [b:b]) Is Nothing Then Exit Sub
sat = "b" & Target.Row & ":E" & Target.Row

With Target
Select Case Target
Case "": Range(sat).Interior.ColorIndex = 0
Case Is = "1": Range(sat).Interior.ColorIndex = 1
Case Is = "2": Range(sat).Interior.ColorIndex = 2
Case Is = "3": Range(sat).Interior.ColorIndex = 3
Case Is = "4": Range(sat).Interior.ColorIndex = 4
Case Is = "5": Range(sat).Interior.ColorIndex = 5
Case Is = "6": Range(sat).Interior.ColorIndex = 6
Case Is = "7": Range(sat).Interior.ColorIndex = 7
Case Is = "8": Range(sat).Interior.ColorIndex = 6
Case Is = "9": Range(sat).Interior.ColorIndex = 9
Case Is = "10": Range(sat).Interior.ColorIndex = 10
Case Is = "11": Range(sat).Interior.ColorIndex = 11
Case Is = "12": Range(sat).Interior.ColorIndex = 12
Case Is = "13": Range(sat).Interior.ColorIndex = 13
Case Is = "14": Range(sat).Interior.ColorIndex = 14
Case Is = "15": Range(sat).Interior.ColorIndex = 15
Case Is = "16": Range(sat).Interior.ColorIndex = 16
Case Is = "17": Range(sat).Interior.ColorIndex = 17
Case Is = "18": Range(sat).Interior.ColorIndex = 18
Case Is = "19": Range(sat).Interior.ColorIndex = 19
Case Is = "20": Range(sat).Interior.ColorIndex = 20
Case Is = "21": Range(sat).Interior.ColorIndex = 21
Case Is = "22": Range(sat).Interior.ColorIndex = 22
Case Is = "23": Range(sat).Interior.ColorIndex = 23
Case Is = "24": Range(sat).Interior.ColorIndex = 24
Case Is = "25": Range(sat).Interior.ColorIndex = 25
Case Is = "26": Range(sat).Interior.ColorIndex = 26
Case Is = "27": Range(sat).Interior.ColorIndex = 27
Case Is = "28": Range(sat).Interior.ColorIndex = 28
Case Is = "29": Range(sat).Interior.ColorIndex = 29
Case Is = "30": Range(sat).Interior.ColorIndex = 30
Case Is = "31": Range(sat).Interior.ColorIndex = 31
Case Is = "32": Range(sat).Interior.ColorIndex = 32
Case Is = "33": Range(sat).Interior.ColorIndex = 33
Case Is = "34": Range(sat).Interior.ColorIndex = 34
Case Is = "35": Range(sat).Interior.ColorIndex = 35
Case Is = "36": Range(sat).Interior.ColorIndex = 36
Case Is = "37": Range(sat).Interior.ColorIndex = 37
Case Is = "38": Range(sat).Interior.ColorIndex = 38
Case Is = "39": Range(sat).Interior.ColorIndex = 39
Case Is = "40": Range(sat).Interior.ColorIndex = 40
Case Is = "41": Range(sat).Interior.ColorIndex = 41
Case Is = "42": Range(sat).Interior.ColorIndex = 42
Case Is = "43": Range(sat).Interior.ColorIndex = 43
Case Is = "44": Range(sat).Interior.ColorIndex = 44
Case Is = "45": Range(sat).Interior.ColorIndex = 45
Case Is = "46": Range(sat).Interior.ColorIndex = 46
Case Is = "47": Range(sat).Interior.ColorIndex = 47
Case Is = "48": Range(sat).Interior.ColorIndex = 48
Case Is = "49": Range(sat).Interior.ColorIndex = 49
Case Is = "50": Range(sat).Interior.ColorIndex = 50
Case Is = "51": Range(sat).Interior.ColorIndex = 51
Case Is = "52": Range(sat).Interior.ColorIndex = 52
Case Is = "53": Range(sat).Interior.ColorIndex = 53
Case Is = "54": Range(sat).Interior.ColorIndex = 54
Case Is = "55": Range(sat).Interior.ColorIndex = 55
Case Is = "56": Range(sat).Interior.ColorIndex = 56

Case Else
Range(sat).Interior.ColorIndex = 0
End Select
End With


End Sub


" sayfaya =Sayfa1!A2 ile çektiğim zaman Sayfa 1 deki A2 hücresini biçimleri ile birlikte getirmeli" sorunuz için de;

Aynı kodları bir kaç değişiklikle Sayfa2'nin kod bölümüne de yazmak gerekir.

.
 

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
yine aynı hatayı verdi...
hatanın resmini ekliyorum.
saolun ilgilendiğiniz için

variable not defined hatası veriyor
 

Ekli dosyalar

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
TEŞEKKÜR EDERİM AYIN YURTTAŞ

ama;

ilk listeye veriler sıralama fonksiyonu ile geliyor.
yani B sütunundaki rakamlar oraya otomatik geliyor ve veriler değişince rakamlarda değişiyor.
rakamlar değiştiği zaman ise renkler değişmiyor.
taki ben hücreye tıklayana kadar.
değişmesi gereken hücre aktif olunca macro çalışıyor yani.

bu macroyu bir düğmeye bağlayamaz mıyız?
ben verilerimi girdikten sonra F9 a basıp elle hesaplatma yapıyorum.
bir düğme yapalım ve hem hesaplatmayı hemde bu macroları o düğmeye bağlayalım, olmaz mı?
 

umitumit

Altın Üye
Katılım
5 Eylül 2006
Mesajlar
364
Excel Vers. ve Dili
Excel 2016
Türkçe
Altın Üyelik Bitiş Tarihi
13-07-2028
sayın yurttas, orada mısınız?
 
Üst