AW: Sortien nach gesamt und Anzahl
16.01.2010 16:14:03
Klaus-Dieter
Hallo Sankt,
mit diesem Makro geht das:
Microsoft Excel Objekt Tabelle1
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("E7:K15"))
If Not isect Is Nothing Then
Range("E7:O15").Sort Key1:=Range("O7"), Order1:=xlDescending, Key2:=Range("L7") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
End If
End Sub
[size=8]Code eingefügt mit [url=http://vbahtml.origo.ethz.ch] VBA in HTML 2.0.0.1[/url][/size]
Tabelle1
| E | F | G | H | I | J | K | L | M | N | O |
5 | Rd.1 | Rd. 2 | Rd. 3 | Rd.4 | Rd.5 | Rd.6 | Rd.7 | Ges. | Ø | Diff | Anzahl |
6 | | | | | | | | | | | |
7 | 18 | 19 | 19 | 18 | 19 | 19 | 19 | 131 | 18,71 | 1 | 7 |
8 | 20 | 20 | 21 | 21 | 18 | 21 | 22 | 143 | 20,43 | 4 | 7 |
9 | 22 | 22 | 22 | 22 | 22 | 22 | 26 | 158 | 22,57 | 4 | 7 |
10 | 21 | 22 | 30 | 20 | 32 | 19 | 18 | 162 | 23,14 | 14 | 7 |
11 | 23 | 21 | 21 | 22 | 22 | 21 | | 130 | 21,67 | 2 | 6 |
12 | 24 | 24 | 24 | 21 | | | | 93 | 23,25 | 3 | 4 |
13 | 24 | 25 | 26 | 21 | | | | 96 | 24,00 | 5 | 4 |
14 | 24 | 25 | 23 | 25 | | | | 97 | 24,25 | 2 | 4 |
15 | | | | | | | | 0 | | | 0 |
Formeln der Tabelle |
Zelle | Formel | M5 | =ZEICHEN(216) | L7 | =SUMME(E7:K7) | M7 | =WENN(L7=0;"";SUMME(E7:K7)/ANZAHL(E7:K7)) | N7 | =WENN(L7=0;"";MAX(E7:K7)-MIN(E7:K7)) | O7 | =7-ANZAHLLEEREZELLEN(E7:K7) | L8 | =SUMME(E8:K8) | M8 | =WENN(L8=0;"";SUMME(E8:K8)/ANZAHL(E8:K8)) | N8 | =WENN(L8=0;"";MAX(E8:K8)-MIN(E8:K8)) | O8 | =7-ANZAHLLEEREZELLEN(E8:K8) | L9 | =SUMME(E9:K9) | M9 | =WENN(L9=0;"";SUMME(E9:K9)/ANZAHL(E9:K9)) | N9 | =WENN(L9=0;"";MAX(E9:K9)-MIN(E9:K9)) | O9 | =7-ANZAHLLEEREZELLEN(E9:K9) | L10 | =SUMME(E10:K10) | M10 | =WENN(L10=0;"";SUMME(E10:K10)/ANZAHL(E10:K10)) | N10 | =WENN(L10=0;"";MAX(E10:K10)-MIN(E10:K10)) | O10 | =7-ANZAHLLEEREZELLEN(E10:K10) | L11 | =SUMME(E11:K11) | M11 | =WENN(L11=0;"";SUMME(E11:K11)/ANZAHL(E11:K11)) | N11 | =WENN(L11=0;"";MAX(E11:K11)-MIN(E11:K11)) | O11 | =7-ANZAHLLEEREZELLEN(E11:K11) | L12 | =SUMME(E12:K12) | M12 | =WENN(L12=0;"";SUMME(E12:K12)/ANZAHL(E12:K12)) | N12 | =WENN(L12=0;"";MAX(E12:K12)-MIN(E12:K12)) | O12 | =7-ANZAHLLEEREZELLEN(E12:K12) | L13 | =SUMME(E13:K13) | M13 | =WENN(L13=0;"";SUMME(E13:K13)/ANZAHL(E13:K13)) | N13 | =WENN(L13=0;"";MAX(E13:K13)-MIN(E13:K13)) | O13 | =7-ANZAHLLEEREZELLEN(E13:K13) | L14 | =SUMME(E14:K14) | M14 | =WENN(L14=0;"";SUMME(E14:K14)/ANZAHL(E14:K14)) | N14 | =WENN(L14=0;"";MAX(E14:K14)-MIN(E14:K14)) | O14 | =7-ANZAHLLEEREZELLEN(E14:K14) | L15 | =SUMME(E15:K15) | M15 | =WENN(L15=0;"";SUMME(E15:K15)/ANZAHL(E15:K15)) | N15 | =WENN(L15=0;"";MAX(E15:K15)-MIN(E15:K15)) | O15 | =7-ANZAHLLEEREZELLEN(E15:K15) |
|
Viele Grüße Klaus-Dieter
Online-Excel