![]() |
How to write an average formula from VBA- SHOULD BE SIMPLE!
Two ways: Sub AverageThem1() x =WorkSheetFunction.Average(Range("b4"), Range("e6")) MsgBox x End Sub Or to write Average Formula to WorkSheet cell, say Range F2 Sub AverageThem2() Range("F2").Formula="=Average(b4,e6)" End Su -- david ----------------------------------------------------------------------- davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064 View this thread: http://www.excelforum.com/showthread.php?threadid=47501 |
All times are GMT +1. The time now is 10:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com