Sub Mittelwert ()
letzteZeile = Range("D65536").End(xlUp).Row
For i = 4 To letzteZeile
j = 0
mw = 0
If IsNumeric(Range("A" & i).Value ) Then
j = j +1
mw = mw + Range("A" & i).Value
End If
If IsNumeric(Range("B" & i).Value ) Then
j = j +1
mw = mw + Range("B" & i).Value
End If
If IsNumeric(Range("C" & i).Value ) Then
j = j +1
mw = mw + Range("C" & i).Value
End If
mw = mw / j
Next i
End SubOption Explicit
Sub Mittelwert()
Dim intI As Integer
For intI = 4 To ActiveSheet.Range("A:C").Find("*", searchdirection:=xlPrevious).Row
Cells(intI, 4).Value = _
WorksheetFunction.Sum(Range("A" & intI & ":C" & intI)) / _
WorksheetFunction.Count(Range("A" & intI & ":C" & intI))
Next
End SubOption Explicit
Sub Mittelwert()
Dim intI As Integer
For intI = 4 To ActiveSheet.Range("A:C").Find("*", searchdirection:=xlPrevious).Row
Cells(intI, 4).Value = WorksheetFunction.Average(Range("A" & intI & ":C" & intI))
Next
End Sub
Schrittweite der Zellbezüge bestimmen
pa647 29.05.2007 - 103 Hits - 3 Antworten
VBA: Variabelen und Zellbezüge
Trudi 04.07.2007 - 92 Hits - 4 Antworten
Excel VBA Textbox drucken
BossD 05.07.2007 - 77 Hits - 2 Antworten
Schnellreferenz Excel VBA
Joshuan 23.05.2008 - 219 Hits - 3 Antworten
VBA-Excel
mentosbasi 28.05.2008 - 349 Hits - 3 Antworten