• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

alttoplam renkleri

Katılım
15 Eylül 2007
Mesajlar
1,312
Excel Vers. ve Dili
2013 türkçe
iyi çalışmalar herhese alttoplamları aldığım zaman satırın yazı rengi ve dolgu renkleri ekdeki gözükdüğü gibi olsa yazıyıda koyu yapsa ekdeki gibi makro sadece alttoplam kalemini koyu yapıyor adet ve tutar sütunundaki sayıları koyu yapmıyor onlarda koyu olsa yardımlarınız için şimdiden teşekkür ederim
 

Ekli dosyalar

Iyi hocalarım bana acil yardımalrınız lazım
HOCALARIM ANLAŞILMAYAN BİR KONU VARSA YAZARSANIZ AÇIKLAMAYA ÇALIŞAYIM LÜTFEN BANA YARDIM
 
Son düzenleme:
Merhaba,

Alt toplam koduna aşağıdaki ilaveyi yaparak deneyiniz..

Kod:
Private Sub CommandButton2_Click()
[COLOR=red].[/COLOR]
[COLOR=red].[/COLOR]
[COLOR=red].[/COLOR]
[COLOR=red].[/COLOR]
 
[COLOR=blue]For Each alan In Range("A4:J" & [I65536].End(3).Row)[/COLOR]
[COLOR=blue]  If alan.Value Like "*Toplam*" Then[/COLOR]
[COLOR=blue]      Rows(alan.Row).Font.Bold = True[/COLOR]
[COLOR=blue]  End If[/COLOR]
[COLOR=blue]Next[/COLOR]
 
End sub

.
 
ömer bey ilginiz için teşekkür ederim ancak kodu nere akleyeceğimi bilemedim
DOLGU RENKLENDİRMEYİ NASIL YAPARIZ
 
Son düzenleme:
Kod:
Private Sub CommandButton2_Click()
If ComboBox1 = "" And ComboBox2 = "" And ComboBox3 = "" And ComboBox4 = "" Then Exit Sub
If ComboBox1 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort Key1:=Range("C4"), Order1:=xlAscending, Key2:=Range("D4") _
        , Order2:=xlAscending, Key3:=Range("F4"), Order3:=xlAscending, Header:= _
        xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
        xlSortNormal
 
    Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox2 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort Key1:=Range("C4"), Order1:=xlAscending, Key2:=Range("D4") _
        , Order2:=xlAscending, Key3:=Range("F4"), Order3:=xlAscending, Header:= _
        xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
        xlSortNormal
 
    Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox3 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort Key1:=Range("C4"), Order1:=xlAscending, Key2:=Range("D4") _
        , Order2:=xlAscending, Key3:=Range("F4"), Order3:=xlAscending, Header:= _
        xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
        xlSortNormal
 
    Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox4 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort Key1:=Range("C4"), Order1:=xlAscending, Key2:=Range("D4") _
        , Order2:=xlAscending, Key3:=Range("F4"), Order3:=xlAscending, Header:= _
        xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
        xlSortNormal
 
    Selection.Subtotal GroupBy:=4, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
    [COLOR=blue]For Each alan In Range("A4:J" & [I65536].End(3).Row)[/COLOR]
[COLOR=blue]        If alan.Value Like "*Toplam*" Then[/COLOR]
[COLOR=blue]            Rows(alan.Row).Font.Bold = True[/COLOR]
[COLOR=blue]        End If[/COLOR]
[COLOR=blue]    Next[/COLOR]
 
End Sub

.
 
ömer bey ilginiz için teşekkürederim koyu olmasını yaptı dolgu renk lerini ve yazı renlerini de ayaralyı verebilirmisiniz
 
Yukarıda yazdığım ( mavi ) bölümü aşağıdakiyle değiştiriniz..

Kod:
For Each alan In Range("C4:J" & [I65536].End(3).Row)
    If alan.Value Like "*Toplam*" Then
        With Range("C" & alan.Row & ":J" & alan.Row)
            .Interior.ColorIndex = 11
            .Font.ColorIndex = 3
            .Font.Bold = True
        End With
    End If
Next
 
ömer bey teşekkür ederim emeğinize sağlık
sıralamasını ben ekde olduğu gibi c,d,f sütunlarına göre yapmıştım üç seçenekmi var dört yapabilirmiyiz çünkü her sütunu kendi içinde sıralamak istiyorum
 
Form2 sayfasında bulunan kodların tümünü aşağıdaki kodlarla değiştiriniz..

Kod:
Private Sub CommandButton1_Click()
On Error Resume Next
Cells.RemoveSubtotal
    ComboBox1.Text = ""
    ComboBox2.Text = ""
    ComboBox3.Text = ""
    ComboBox4.Text = ""
End Sub
 
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
On Error Resume Next
Cells.RemoveSubtotal
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
For i = 4 To [I65536].End(3).Row
    Cells(i, "L") = Cells(i, "c") & Cells(i, "d") & Cells(i, "e") & Cells(i, "f")
Next i
If ComboBox1 = "" And ComboBox2 = "" And ComboBox3 = "" And ComboBox4 = "" Then Exit Sub
If ComboBox1 <> "" Then
Range("C4").Select
    Range("L4:L65536").Sort Range("L4"), xlAscending
    
    Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox2 <> "" Then
Range("C4").Select
    Range("L4:L65536").Sort Range("L4"), xlAscending
    
    Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox3 <> "" Then
Range("C4").Select
    Range("L4:L65536").Sort Range("L4"), xlAscending
    
    Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox4 <> "" Then
Range("C4").Select
    Range("L4:L65536").Sort Range("L4"), xlAscending
    
    Selection.Subtotal GroupBy:=4, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Range("L:L").ClearContents
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
For Each alan In Range("C4:J" & [I65536].End(3).Row)
    If alan.Value Like "*Toplam*" Then
        With Range("C" & alan.Row & ":J" & alan.Row)
            .Interior.ColorIndex = 11
            .Font.ColorIndex = 3
            .Font.Bold = True
        End With
    End If
Next
Application.ScreenUpdating = True
End Sub
 
Private Sub UserForm_Initialize()
    ComboBox1.RowSource = "C3"
    ComboBox2.RowSource = "D3"
    ComboBox3.RowSource = "E3"
    ComboBox4.RowSource = "F3"
End Sub

.
 
Iyi günler l sütunu ile kodvar ancak l sütununda veri yok anlayamadım örnek dosya ekleye bilirmisiniz
 
Mustafa bey,

Önce form2 deki kodları silin daha sonra benim verdiklerimi kopyalayın. Bunun dışında bir işlem yapmanıza gerek yok.

.
 
O şekilde yaptım ÜRÜNLER SÜTUNUNDA ÖRNEK 1. BÖLGE ENBAŞTA OLMASI LAZIM ANCAK SIRALAMIYOR ALTTOPLAMDAKİ SATIR SOLDAKİ SÜTUNDAN SAĞA DOĞRU AŞAĞIYA DOĞRU OLUYOR TAM TERSİ OLSA YANİ ŞU ŞEKİLDE
Toplam B KIRTASİYE

-------------------------------------------Toplam 4. BÖLGE
----------------------------------Toplam BLOK
---------------------Toplam TAK.
Toplam B KIRTASİYE
Genel Toplam
 
Kodları çalıştırdıktan sonra sıralamanın yanlış şekilde dizildiğini gösteren dosyayı eklermisiniz..

.
 
ürünleri 1. Bölge 2. Bölge diye sıralaması lazım yani her sütunu kendi içinde sıralaması lazım
 

Ekli dosyalar

herkese iyi günler iyi çalışmalar ömer bey istediğiniz şekilde dosyayı ekledim sıralamada 1. ci öncelik toptancı olması lazım 2. ci grup olması lazım 4 seçeneğimiz olursa 3. cü ara grup 4. cü de ürün adı olması lazım eğer 4 seçenekle sıralamazsa 3 senekle sıralarsa 1. mesajdaki ekdeki dosyada 3 senekle sıralama yaptırmıştım toptancı grup ürün adı olarak sıralıyordu
 
Iyi günler bu sıralma ile ilgili excelin üç seçeneği var bunu çağalta bilirmiyiz seçimde 4 5 seçim olursa sıralama seçeneğinide ona gör çağalsa
 
herkese iyigünler iyi çalışmalar ömer bey bu son sıralama işlemine yardımcı olabilrmisiniz
1. mesajımdaki dosyada 3 sütunluk bir sıralama yapıyor ben dört beş sütunluk sıralama yapmak istiyorum
 
Son düzenleme:
Bu şekilde deneyiniz..

Kod:
Private Sub CommandButton1_Click()
On Error Resume Next
Cells.RemoveSubtotal
    ComboBox1.Text = ""
    ComboBox2.Text = ""
    ComboBox3.Text = ""
    ComboBox4.Text = ""
End Sub
 
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
On Error Resume Next
Cells.RemoveSubtotal
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox1 = "" And ComboBox2 = "" And ComboBox3 = "" And ComboBox4 = "" Then Exit Sub
If ComboBox1 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort key1:=Range("D4"), key2:=Range("E4"), key3:=Range("F4")
    Range("C4:J65536").Sort Range("C4")
 
    Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox2 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort key1:=Range("D4"), key2:=Range("E4"), key3:=Range("F4")
    Range("C4:J65536").Sort Range("C4")
 
    Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox3 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort key1:=Range("D4"), key2:=Range("E4"), key3:=Range("F4")
    Range("C4:J65536").Sort Range("C4")
 
    Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If ComboBox4 <> "" Then
Range("C4").Select
    Range("C4:J65536").Sort key1:=Range("D4"), key2:=Range("E4"), key3:=Range("F4")
    Range("C4:J65536").Sort Range("C4")
 
    Selection.Subtotal GroupBy:=4, Function:=xlSum, TotalList:=Array(5, 7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
For Each alan In Range("C4:J" & [I65536].End(3).Row)
    If alan.Value Like "*Toplam*" Then
        With Range("C" & alan.Row & ":J" & alan.Row)
            .Interior.ColorIndex = 11
            .Font.ColorIndex = 3
            .Font.Bold = True
        End With
    End If
Next
Application.ScreenUpdating = True
End Sub
 
Private Sub UserForm_Initialize()
    ComboBox1.RowSource = "C3"
    ComboBox2.RowSource = "D3"
    ComboBox3.RowSource = "E3"
    ComboBox4.RowSource = "F3"
End Sub
.
 
ömer bey denedim yine sıralamıyor
 
Son düzenleme:
Bende herhangi bir sorun olmadı. Eki inceleyiniz.

.
 

Ekli dosyalar

Geri
Üst