Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default worksheet function?

Mm..how to write average worksheet function in VBA? worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default worksheet function?

Hi
msgbox application.worksheetfunction.average(Range("C3:C9 "))

--
Regards
Frank Kabel
Frankfurt, Germany

"KiriumF1" schrieb im Newsbeitrag
...
Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it

like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default worksheet function?

dblAvg = WorksheetFunction.Average
(Worksheets("Sheet1").Range("C3:C9").Value)

--
Regards,
Tom Ogilvy


"KiriumF1" wrote in message
...
Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default worksheet function?

Do to write the below in VBA? I used

Range("C4").Select
Range("c4") = WorksheetFunction.Average(Range("M3:M9"))
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
Range("C4:I4").Select
-----------------------------
in C4: =AVERAGE(M3:M9)

then copy across to I4

--------------------------------------------






"KiriumF1" wrote:

Mm..how to write average worksheet function in VBA? worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default worksheet function?

Worksheetfunction.Average(Worksheets("fulldata for c1").Range("A1:G1"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"KiriumF1" wrote in message
...
Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default worksheet function?

Do to write the below in VBA? I used

Range("C4").Select
Range("c4") = WorksheetFunction.Average(Range("M3:M9"))
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
Range("C4:I4").Select
-----------------------------
in C4: =AVERAGE(M3:M9)

then copy across to I4



"Tom Ogilvy" wrote:

dblAvg = WorksheetFunction.Average
(Worksheets("Sheet1").Range("C3:C9").Value)

--
Regards,
Tom Ogilvy


"KiriumF1" wrote in message
...
Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default worksheet function?

Sub AA()
Range("c4").Formula = "=Average(M3:M9)"
Range("C4").AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
End Sub

--
Regards,
Tom Ogilvy

"KiriumF1" wrote in message
...
Do to write the below in VBA? I used

Range("C4").Select
Range("c4") = WorksheetFunction.Average(Range("M3:M9"))
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
Range("C4:I4").Select
-----------------------------
in C4: =AVERAGE(M3:M9)

then copy across to I4



"Tom Ogilvy" wrote:

dblAvg = WorksheetFunction.Average
(Worksheets("Sheet1").Range("C3:C9").Value)

--
Regards,
Tom Ogilvy


"KiriumF1" wrote in message
...
Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it

like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default worksheet function?

Sub AA()
Range("c4").Formula = "=Average(M3:M9)"
Range("C4").AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
End Sub

--
Regards,
Tom Ogilvy

"KiriumF1" wrote in message
...
Do to write the below in VBA? I used

Range("C4").Select
Range("c4") = WorksheetFunction.Average(Range("M3:M9"))
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:I4"), Type:=xlFillDefault
Range("C4:I4").Select
-----------------------------
in C4: =AVERAGE(M3:M9)

then copy across to I4

--------------------------------------------






"KiriumF1" wrote:

Mm..how to write average worksheet function in VBA?

worksheetfunction.average?

How do I reference to the range of cells in another worksheet? Is it

like
this, WorksheetFunction.Average (Range("fulldata for c1")("C3:C9"))?

Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet Function Brennan Excel Discussion (Misc queries) 1 March 17th 08 04:18 PM
Worksheet Function grobertson Excel Worksheet Functions 1 June 8th 07 05:55 PM
Is there a worksheet function that will... Adam Kroger Excel Worksheet Functions 1 November 20th 05 07:41 PM
Reference the worksheet from a multiple worksheet range function ( DBickel Excel Worksheet Functions 1 May 28th 05 03:49 AM
Can the offset worksheet function reference another worksheet AlistairJ Excel Worksheet Functions 2 May 9th 05 06:18 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"