Da sie zrobić zeby to jakoś działało?
Kod: Zaznacz cały
Sub Procent()
'
' Procent Makro
Range("C7:C10").Select
Selection.NumberFormat = "0.00%"
End Sub
Sub Kwota()
'
' Kwota Makro
'
Range("C7:C10").Select
Selection.NumberFormat = "#,##0.0"
End Sub
Sub Sortuj_DM()
If Range("C6") = 10 Or Range("C6") = 11 Or Range("C6") = 36 Or Range("C6") = 37 Then
Range("B7:C10").Select
Selection.Sort Key1:=Range("C7"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Else
Range("B7:C10").Select
Selection.Sort Key1:=Range("C7"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub
Sub LICZBA_RKO()
'
' LICZBA_RKO Makro
'
Range("D7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "#,##0.0"
End Sub
Sub PROCENT_RKO()
'
' PROCENT_RKO Makro
'
Range("D7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
End Sub
Sub Rank_RKO()
If Range("D6") = 10 Or Range("D6") = 11 Or Range("D6") = 36 Or Range("D6") = 37 Then
Range("B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Else
Range("B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub
Sub Rank_RKO_w_DM()
If Range("D6") = 10 Or Range("D6") = 11 Or Range("D6") = 36 Or Range("D6") = 37 Then
Range("B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("B7"), Order1:=xlAscending, Key2:=Range("D7") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
Else
Range("B7").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("B7"), Order1:=xlAscending, Key2:=Range("D7") _
, Order2:=xlDescending, Header:=xlNo, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
End If
End Sub
Sub PROCENT_SKLEP()
'
' PROCENT_SKLEP Makro
'
ActiveWindow.Panes(1).Activate
Range("F7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
End Sub
Sub KWOTA_SKLEP()
'
' KWOTA_SKLEP Makro
'
'
Range("F7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "#,##0.0"
End Sub
Sub RANK_SKLEP()
If Range("F7") = 10 Or Range("F7") = 11 Or Range("F7") = 36 Or Range("F7") = 37 Then
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("F7"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Else
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("F7"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub
Sub RANK_SKLEP_RKO()
If Range("F7") = 10 Or Range("F7") = 11 Or Range("F7") = 36 Or Range("F7") = 37 Then
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlAscending, Key2:=Range("E7") _
, Order2:=xlAscending, Key3:=Range("F7"), Order3:=xlAscending, Header _
:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
Else
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlAscending, Key2:=Range("E7") _
, Order2:=xlAscending, Key3:=Range("F7"), Order3:=xlDescending, Header _
:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
End If
End Sub
Sub RANK_SKLEP_DM()
If Range("F7") = 10 Or Range("F7") = 11 Or Range("F7") = 36 Or Range("F7") = 37 Then
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlAscending, Key2:=Range("F7") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
Else
Range("B8").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D7"), Order1:=xlAscending, Key2:=Range("F7") _
, Order2:=xlDescending, Header:=xlNo, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
End If
End Sub
Sub Procent_TOP()
'
' Procent_TOP Makro
'
Range("H9,D14:D23,J14:J23").Select
Range("J14").Activate
Selection.Style = "Percent"
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
End Sub
Sub Kwota_TOP()
'
' Kwota_TOP Makro
'
'
Range("H9,D14:D23,J14:J23").Select
Range("J14").Activate
Selection.NumberFormat = "#,##0.0"
End Sub
Sub STWORZ_TOPY()
If Range("AH10") = 10 Or Range("AH10") = 11 Or Range("AH10") = 38 Or Range("AH10") = 39 Or Range("AH10") = 40 Or Range("Ah10") = 41 Then
Range("Ad11").Select
Range(Selection, Selection.End(xlDown)).Select
Range("AD11:AH172").Select
ActiveWindow.SmallScroll Down:=-96
Selection.Sort Key1:=Range("Ah11"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
Else
Range("Ad11").Select
Range(Selection, Selection.End(xlDown)).Select
Range("AD11:AH172").Select
ActiveWindow.SmallScroll Down:=-96
Selection.Sort Key1:=Range("Ah11"), Order1:=xlDescending, Header:=xlNo _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
End If
End Sub