Im Excel 2003 nach Farben sortieren

  • #1
D

Dai

Guest
Hallo zusammen

Kann man im Excel 2003 nach Farben sortieren? Die Texte haben unterschiedliche inhalte. Der feldinhalt ist immer weiss. Ich will zum beispiel eine spalte nach farbe sortieren.

Vielen Dank in vorraus
 
  • #2
Einfügen - Name - Namen definieren -
Farbe
Zuordnen zu:
=ZELLE.ZUORDNEN(24;INDIREKT(ZS(-1);FALSCH))
- hinzufügen - ok.
Jetzt in einer Hilfsspalte rechts neben der farbigen Spalte Formel eingeben: =Farbe
Diese Formel nach unten ziehen, jetzt stehen die Farbnummern der farbigen Spalte in der Hilfsspalte, danach kannst Du dann sortieren.

Im Beispiel handelt es sich bei
24 in der Formel - um die Schriftfarbe, falls Du den Hintergrund meinst, musst Du 24 gegen 63 austauschen.
 
  • #4
Ola,

nur rein interessehalber: Warum funktioniert die Formel? wo stehen die Farbnummern zum nachlesen?
 
  • #5
Eventuell sind es diese da.
Laß mal die folgenden Makros laufen. Das erste poliert die dröge Standard-Farbpalette auf:
Code:
Sub Farben_schoen_definieren()
 ->original ky-Makro
  ActiveWorkbook.Colors(1) = RGB(165, 0, 33)-> ochsenblut
  ActiveWorkbook.Colors(2) = RGB(255, 255, 255)-> weiß
  ActiveWorkbook.Colors(3) = RGB(255, 0, 0)-> rot
  ActiveWorkbook.Colors(4) = RGB(0, 255, 0)-> leuchtgrün
  ActiveWorkbook.Colors(5) = RGB(0, 0, 255)-> dunkelblau
  ActiveWorkbook.Colors(6) = RGB(255, 255, 0)-> gelb
  ActiveWorkbook.Colors(7) = RGB(255, 102, 153)-> altrosa
  ActiveWorkbook.Colors(8) = RGB(0, 255, 255)-> türkis
  ActiveWorkbook.Colors(9) = RGB(204, 0, 0)-> weinrot
  ActiveWorkbook.Colors(10) = RGB(51, 204, 51)-> grün
  ActiveWorkbook.Colors(11) = RGB(0, 0, 153)-> miternachtsblau
  ActiveWorkbook.Colors(12) = RGB(204, 102, 0)-> rotbraun
  ActiveWorkbook.Colors(13) = RGB(204, 0, 255)-> lila
  ActiveWorkbook.Colors(14) = RGB(45, 182, 179)-> meerblau
  ActiveWorkbook.Colors(15) = RGB(221, 221, 221)-> hellgrau
  ActiveWorkbook.Colors(16) = RGB(95, 95, 95)-> dunkelgrau
  ActiveWorkbook.Colors(33) = RGB(163, 224, 255)-> 6/4 hellblau
  ActiveWorkbook.Colors(34) = RGB(204, 255, 255)-> taubeneiblau
  ActiveWorkbook.Colors(35) = RGB(204, 255, 204)-> blaß-grün
  ActiveWorkbook.Colors(36) = RGB(255, 255, 153)-> blaß-gelb
  ActiveWorkbook.Colors(37) = RGB(204, 236, 255)-> blaß-blau
  ActiveWorkbook.Colors(38) = RGB(255, 204, 204)-> blaß-rosa
  ActiveWorkbook.Colors(39) = RGB(219, 183, 255)-> 7/5 blaß-lila
  ActiveWorkbook.Colors(40) = RGB(255, 214, 133)-> sand
  ActiveWorkbook.Colors(41) = RGB(102, 153, 255)-> graublau
  ActiveWorkbook.Colors(42) = RGB(0, 204, 255)-> hellblau intensiv
  ActiveWorkbook.Colors(43) = RGB(204, 153, 0)-> hellbraun
  ActiveWorkbook.Colors(44) = RGB(255, 204, 0)-> hellorange
  ActiveWorkbook.Colors(45) = RGB(255, 153, 0)-> dunkelorange
  ActiveWorkbook.Colors(46) = RGB(255, 102, 204)-> pink
  ActiveWorkbook.Colors(47) = RGB(153, 0, 204)-> dunkellila
  ActiveWorkbook.Colors(48) = RGB(169, 169, 169)-> 8/3 mittelgrau
  ActiveWorkbook.Colors(49) = RGB(0, 143, 140)-> petrol
  ActiveWorkbook.Colors(50) = RGB(153, 204, 0)-> olivgrün
  ActiveWorkbook.Colors(51) = RGB(0, 153, 0)-> dunkelgrün
  ActiveWorkbook.Colors(53) = RGB(204, 0, 153)-> dunkelpink
  ActiveWorkbook.Colors(52) = RGB(153, 102, 0)-> dunkelbraun
  ActiveWorkbook.Colors(54) = RGB(204, 153, 255)-> helllila
  ActiveWorkbook.Colors(55) = RGB(153, 0, 153)-> dunkelmalve
  ActiveWorkbook.Colors(56) = RGB(0, 0, 0)-> schwarz
  
  ActiveWorkbook.Colors(17) = RGB(189, 189, 255)-> hellblau
  ActiveWorkbook.Colors(18) = RGB(189, 255, 189)-> hellgrün
  ActiveWorkbook.Colors(19) = RGB(255, 189, 189)-> rosa
  ActiveWorkbook.Colors(20) = RGB(249, 249, 135)-> hellgelb
  ActiveWorkbook.Colors(21) = RGB(204, 153, 255)-> helllila
  ActiveWorkbook.Colors(22) = RGB(255, 204, 102)-> hellorange
  ActiveWorkbook.Colors(23) = RGB(73, 255, 207)-> türkis
  ActiveWorkbook.Colors(24) = RGB(255, 153, 255)-> hellmagenta
  ActiveWorkbook.Colors(25) = RGB(51, 102, 255)-> dunkelblau
  ActiveWorkbook.Colors(26) = RGB(0, 255, 153)-> giftgrün
  ActiveWorkbook.Colors(27) = RGB(255, 124, 128)-> hellrot
  ActiveWorkbook.Colors(28) = RGB(255, 255, 0)-> gelb
  ActiveWorkbook.Colors(29) = RGB(204, 0, 255)-> dunkellila
  ActiveWorkbook.Colors(30) = RGB(255, 153, 51)-> dunkelorange
  ActiveWorkbook.Colors(31) = RGB(0, 204, 102)-> dunkelgrün
  ActiveWorkbook.Colors(32) = RGB(255, 0, 255)-> magenta
End Sub

Dieses malt dir die Farben mit Farbbezeichnung auf:
Code:
Sub Farben_aufmalen()
 ->original ky-Makro
  Range(A1).Interior.ColorIndex = 1-> ochsenblut
  Range(A1).Font.ColorIndex = 2
  Range(A1).FormulaR1C1 = ochsenblut
  Range(B1).Interior.ColorIndex = 53-> dunkelpink
  Range(B1).Font.ColorIndex = 2
  Range(B1).FormulaR1C1 = dunkelpink
  Range(C1).Interior.ColorIndex = 52-> dunkelbraun
  Range(C1).Font.ColorIndex = 2
  Range(C1).FormulaR1C1 = dunkelbraun
  Range(D1).Interior.ColorIndex = 51-> dunkelgrün
  Range(D1).Font.ColorIndex = 2
  Range(D1).FormulaR1C1 = dunkelgrün
  Range(E1).Interior.ColorIndex = 49-> petrol
  Range(E1).Font.ColorIndex = 2
  Range(E1).FormulaR1C1 = petrol
  Range(F1).Interior.ColorIndex = 11-> miternachtsblau
  Range(F1).Font.ColorIndex = 2
  Range(F1).FormulaR1C1 = miternachtsblau
  Range(G1).Interior.ColorIndex = 55-> deep purple
  Range(G1).Font.ColorIndex = 2
  Range(G1).FormulaR1C1 = deep purple
  Range(H1).Interior.ColorIndex = 56-> schwarz
  Range(H1).Font.ColorIndex = 2
  Range(H1).FormulaR1C1 = schwarz
  Range(A2).Interior.ColorIndex = 9-> weinrot
  Range(A2).FormulaR1C1 = weinrot
  Range(B2).Interior.ColorIndex = 46-> pink
  Range(B2).FormulaR1C1 = pink
  Range(C2).Interior.ColorIndex = 12-> rotbraun
  Range(C2).FormulaR1C1 = rotbraun
  Range(D2).Interior.ColorIndex = 10-> grün
  Range(D2).FormulaR1C1 = grün
  Range(E2).Interior.ColorIndex = 14-> meerblau
  Range(E2).FormulaR1C1 = meerblau
  Range(F2).Interior.ColorIndex = 5-> dunkelblau
  Range(F2).FormulaR1C1 = dunkelblau
  Range(G2).Interior.ColorIndex = 47-> dunkellila
  Range(G2).FormulaR1C1 = dunkellila
  Range(H2).Interior.ColorIndex = 16-> dunkelgrau
  Range(H2).FormulaR1C1 = dunkelgrau
  Range(A3).Interior.ColorIndex = 3-> rot
  Range(A3).FormulaR1C1 = rot
  Range(B3).Interior.ColorIndex = 45-> dunkelorange
  Range(B3).FormulaR1C1 = dunkelorange
  Range(C3).Interior.ColorIndex = 43-> hellbraun
  Range(C3).FormulaR1C1 = hellbraun
  Range(D3).Interior.ColorIndex = 50-> olivgrün
  Range(D3).FormulaR1C1 = olivgrün
  Range(E3).Interior.ColorIndex = 42-> hellblau intensiv
  Range(E3).FormulaR1C1 = hellblau intensiv
  Range(F3).Interior.ColorIndex = 41-> graublau
  Range(F3).FormulaR1C1 = graublau
  Range(G3).Interior.ColorIndex = 13-> lila
  Range(G3).FormulaR1C1 = lila
  Range(H3).Interior.ColorIndex = 48-> mittelgrau
  Range(H3).FormulaR1C1 = mittelgrau
  Range(A4).Interior.ColorIndex = 7-> altrosa
  Range(A4).FormulaR1C1 = altrosa
  Range(B4).Interior.ColorIndex = 44-> hellorange
  Range(B4).FormulaR1C1 = hellorange
  Range(C4).Interior.ColorIndex = 6-> gelb
  Range(C4).FormulaR1C1 = gelb
  Range(D4).Interior.ColorIndex = 4-> leuchtgrün
  Range(D4).FormulaR1C1 = hellgrün
  Range(E4).Interior.ColorIndex = 8-> türkis
  Range(E4).FormulaR1C1 = türkis
  Range(F4).Interior.ColorIndex = 33-> hellblau
  Range(F4).FormulaR1C1 = hellblau
  Range(G4).Interior.ColorIndex = 54-> helllila
  Range(G4).FormulaR1C1 = helllila
  Range(H4).Interior.ColorIndex = 15-> hellgrau
  Range(H4).FormulaR1C1 = hellgrau
  Range(A5).Interior.ColorIndex = 38-> blaß-rosa
  Range(A5).FormulaR1C1 = blaßrosa
  Range(B5).Interior.ColorIndex = 40-> sand
  Range(B5).FormulaR1C1 = sand
  Range(C5).Interior.ColorIndex = 36-> blaß-gelb
  Range(C5).FormulaR1C1 = blaßgelb
  Range(D5).Interior.ColorIndex = 35-> blaß-grün
  Range(D5).FormulaR1C1 = blaßgrün
  Range(E5).Interior.ColorIndex = 34-> taubeneiblau
  Range(E5).FormulaR1C1 = taubenei
  Range(F5).Interior.ColorIndex = 37-> blaß-blau
  Range(F5).FormulaR1C1 = blaßblau
  Range(G5).Interior.ColorIndex = 39-> blaß-lila
  Range(G5).FormulaR1C1 = blaßlila
  Range(H5).Interior.ColorIndex = 2-> weiß
  Range(H5).FormulaR1C1 = weiß
  
  Range(A7).Interior.ColorIndex = 17-> hellblau
  Range(A7).FormulaR1C1 = hellblau
  Range(B7).Interior.ColorIndex = 18-> hellgrün
  Range(B7).FormulaR1C1 = hellgrün
  Range(C7).Interior.ColorIndex = 19-> rosa
  Range(C7).FormulaR1C1 = rosa
  Range(D7).Interior.ColorIndex = 20-> hellgelb
  Range(D7).FormulaR1C1 = hellgelb
  Range(E7).Interior.ColorIndex = 21-> helllila
  Range(E7).FormulaR1C1 = helllila
  Range(F7).Interior.ColorIndex = 22-> hellorange
  Range(F7).FormulaR1C1 = hellorange
  Range(G7).Interior.ColorIndex = 23-> türkis
  Range(G7).FormulaR1C1 = türkis
  Range(H7).Interior.ColorIndex = 24-> hellmagenta
  Range(H7).FormulaR1C1 = hellmagenta
  Range(A8).Interior.ColorIndex = 25-> dunkelblau
  Range(A8).FormulaR1C1 = dunkelblau
  Range(B8).Interior.ColorIndex = 26-> giftgrün
  Range(B8).FormulaR1C1 = giftgrün
  Range(C8).Interior.ColorIndex = 27-> hellrot
  Range(C8).FormulaR1C1 = hellrot
  Range(D8).Interior.ColorIndex = 28-> gelb
  Range(D8).FormulaR1C1 = gelb
  Range(E8).Interior.ColorIndex = 29-> dunkellila
  Range(E8).FormulaR1C1 = dunkellila
  Range(F8).Interior.ColorIndex = 30-> dunkelorange
  Range(F8).FormulaR1C1 = dunkelorange
  Range(G8).Interior.ColorIndex = 31-> dunkelgrün
  Range(G8).FormulaR1C1 = dunkelgrün
  Range(H8).Interior.ColorIndex = 32-> magenta
  Range(H8).FormulaR1C1 = magenta
End Sub

Und dieses malt dir die Farben mit der Farbnummer. Hoffentlich ist es die gleiche Nummerierung wie in der Formel:
Code:
Sub Farbnummern()
 ->original ky-Makro
  Range(A1).Interior.ColorIndex = 1-> ochsenblut
  Range(A1).Font.ColorIndex = 2
  Range(A1).FormulaR1C1 = 1
  Range(B1).Interior.ColorIndex = 53-> dunkelpink
  Range(B1).Font.ColorIndex = 2
  Range(B1).FormulaR1C1 = 53
  Range(C1).Interior.ColorIndex = 52-> dunkelbraun
  Range(C1).Font.ColorIndex = 2
  Range(C1).FormulaR1C1 = 52
  Range(D1).Interior.ColorIndex = 51-> dunkelgrün
  Range(D1).Font.ColorIndex = 2
  Range(D1).FormulaR1C1 = 51
  Range(E1).Interior.ColorIndex = 49-> petrol
  Range(E1).Font.ColorIndex = 2
  Range(E1).FormulaR1C1 = 49
  Range(F1).Interior.ColorIndex = 11-> miternachtsblau
  Range(F1).Font.ColorIndex = 2
  Range(F1).FormulaR1C1 = 11
  Range(G1).Interior.ColorIndex = 55-> deep purple
  Range(G1).Font.ColorIndex = 2
  Range(G1).FormulaR1C1 = 55
  Range(H1).Interior.ColorIndex = 56-> schwarz
  Range(H1).Font.ColorIndex = 2
  Range(H1).FormulaR1C1 = 56
  Range(A2).Interior.ColorIndex = 9-> weinrot
  Range(A2).FormulaR1C1 = 9
  Range(B2).Interior.ColorIndex = 46-> pink
  Range(B2).FormulaR1C1 = 46
  Range(C2).Interior.ColorIndex = 12-> rotbraun
  Range(C2).FormulaR1C1 = 12
  Range(D2).Interior.ColorIndex = 10-> grün
  Range(D2).FormulaR1C1 = 10
  Range(E2).Interior.ColorIndex = 14-> meerblau
  Range(E2).FormulaR1C1 = 14
  Range(F2).Interior.ColorIndex = 5-> dunkelblau
  Range(F2).FormulaR1C1 = 5
  Range(G2).Interior.ColorIndex = 47-> dunkellila
  Range(G2).FormulaR1C1 = 47
  Range(H2).Interior.ColorIndex = 16-> dunkelgrau
  Range(H2).FormulaR1C1 = 16
  Range(A3).Interior.ColorIndex = 3-> rot
  Range(A3).FormulaR1C1 = 3
  Range(B3).Interior.ColorIndex = 45-> dunkelorange
  Range(B3).FormulaR1C1 = 45
  Range(C3).Interior.ColorIndex = 43-> hellbraun
  Range(C3).FormulaR1C1 = 43
  Range(D3).Interior.ColorIndex = 50-> olivgrün
  Range(D3).FormulaR1C1 = 50
  Range(E3).Interior.ColorIndex = 42-> hellblau intensiv
  Range(E3).FormulaR1C1 = 42
  Range(F3).Interior.ColorIndex = 41-> graublau
  Range(F3).FormulaR1C1 = 41
  Range(G3).Interior.ColorIndex = 13-> lila
  Range(G3).FormulaR1C1 = 13
  Range(H3).Interior.ColorIndex = 48-> mittelgrau
  Range(H3).FormulaR1C1 = 48
  Range(A4).Interior.ColorIndex = 7-> altrosa
  Range(A4).FormulaR1C1 = 7
  Range(B4).Interior.ColorIndex = 44-> hellorange
  Range(B4).FormulaR1C1 = 44
  Range(C4).Interior.ColorIndex = 6-> gelb
  Range(C4).FormulaR1C1 = 6
  Range(D4).Interior.ColorIndex = 4-> leuchtgrün
  Range(D4).FormulaR1C1 = 4
  Range(E4).Interior.ColorIndex = 8-> türkis
  Range(E4).FormulaR1C1 = 8
  Range(F4).Interior.ColorIndex = 33-> hellblau
  Range(F4).FormulaR1C1 = 33
  Range(G4).Interior.ColorIndex = 54-> helllila
  Range(G4).FormulaR1C1 = 54
  Range(H4).Interior.ColorIndex = 15-> hellgrau
  Range(H4).FormulaR1C1 = 15
  Range(A5).Interior.ColorIndex = 38-> blaß-rosa
  Range(A5).FormulaR1C1 = 38
  Range(B5).Interior.ColorIndex = 40-> sand
  Range(B5).FormulaR1C1 = 40
  Range(C5).Interior.ColorIndex = 36-> blaß-gelb
  Range(C5).FormulaR1C1 = 36
  Range(D5).Interior.ColorIndex = 35-> blaß-grün
  Range(D5).FormulaR1C1 = 35
  Range(E5).Interior.ColorIndex = 34-> taubeneiblau
  Range(E5).FormulaR1C1 = 34
  Range(F5).Interior.ColorIndex = 37-> blaß-blau
  Range(F5).FormulaR1C1 = 37
  Range(G5).Interior.ColorIndex = 39-> blaß-lila
  Range(G5).FormulaR1C1 = 39
  Range(H5).Interior.ColorIndex = 2-> weiß
  Range(H5).FormulaR1C1 = 2
  
  Range(A7).Interior.ColorIndex = 17-> hellblau
  Range(A7).FormulaR1C1 = 17
  Range(B7).Interior.ColorIndex = 18-> hellgrün
  Range(B7).FormulaR1C1 = 18
  Range(C7).Interior.ColorIndex = 19-> rosa
  Range(C7).FormulaR1C1 = 19
  Range(D7).Interior.ColorIndex = 20-> hellgelb
  Range(D7).FormulaR1C1 = 20
  Range(E7).Interior.ColorIndex = 21-> helllila
  Range(E7).FormulaR1C1 = 21
  Range(F7).Interior.ColorIndex = 22-> hellorange
  Range(F7).FormulaR1C1 = 22
  Range(G7).Interior.ColorIndex = 23-> türkis
  Range(G7).FormulaR1C1 = 23
  Range(H7).Interior.ColorIndex = 24-> hellmagenta
  Range(H7).FormulaR1C1 = 24
  Range(A8).Interior.ColorIndex = 25-> dunkelblau
  Range(A8).FormulaR1C1 = 25
  Range(B8).Interior.ColorIndex = 26-> giftgrün
  Range(B8).FormulaR1C1 = 26
  Range(C8).Interior.ColorIndex = 27-> hellrot
  Range(C8).FormulaR1C1 = 27
  Range(D8).Interior.ColorIndex = 28-> gelb
  Range(D8).FormulaR1C1 = 28
  Range(E8).Interior.ColorIndex = 29-> dunkellila
  Range(E8).FormulaR1C1 = 29
  Range(F8).Interior.ColorIndex = 30-> dunkelorange
  Range(F8).FormulaR1C1 = 30
  Range(G8).Interior.ColorIndex = 31-> dunkelgrün
  Range(G8).FormulaR1C1 = 31
  Range(H8).Interior.ColorIndex = 32-> magenta
  Range(H8).FormulaR1C1 = 32
 End Sub
 
  • #6
Ola,

:) :) danke
 
  • #7
das sind die alten Excel4 Makros:
Was macht ZELLE.ZUORDNEN:


Gruß Lisa
 
Thema:

Im Excel 2003 nach Farben sortieren

ANGEBOTE & SPONSOREN

Statistik des Forums

Themen
113.839
Beiträge
707.962
Mitglieder
51.492
Neuestes Mitglied
Janus36
Oben