View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default VBA for EXCEL and Average

One way:

UserForm1.TextBox1.Text = Application.Average(Range("A1:A100"))

In article ,
"D.S." wrote:

Can VBA code be used to return the average of a worksheet selection? I'd
like to code a userform textbox to return this average.

D.S.