View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Markus Scheible[_2_] Markus Scheible[_2_] is offline
external usenet poster
 
Posts: 95
Default How to calculate this on all rows?

Hi Albert,

two possibilities: if you just want to do it once, you
could drag and drop it to the rows.... just click at the
bottom border of the cell I2 and drop down while you are
clicking until you reach the cell you want to end...

another possibility would be in VBA, if you need it more
often:

Sub dropdown()

For i = 1 To 35562

Range("I" & i).Formula = "=Gemiddelde(F" & i & ":g" & i
& ":h" & i & ")"
Next i

End Sub

Best

Markus

PS: gemiddelde and Mittelwert somehow correspond ;o)



-----Original Message-----
Today I discovered the global scripting possibilities in

Excel.
Until now, in cell I2, I calculated the average of 3

values like this:

=GEMIDDELDE(F2:G2:H2)

'Gemiddelde' means 'average' in Dutch (I use a Dutch

Excel).

I'd like to make the sheet do this on all rows. Any ideas?
It shouldn't be too hard I guess, but I'm not a VB

programmer.

Thanks,

Albert


.