Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2006

Tip: Looking for answers? Try searching our database.

Average Function and dynamic cell address

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
spartanmba - 30 Sep 2006 16:29 GMT
I am sure this is an easy answer for some of you, but I am not sure how to do
this...thanks for your help in advance.

I have an average formula that I would like to dynamically change the number
of rows it averages.  For example if I have 25 cells of data, but the user
only wants ten rows for their work.   I would have them enter into a cell the
number of points that want averaged and the average formula would dynamically
adjust based upon their entry.  I know I need to dynamically create an
address (row and column) information for the forumla, but I am totally lost
on how to do this.

THANKS again!
John
Trevor Shuttleworth - 30 Sep 2006 16:35 GMT
=AVERAGE(OFFSET(A1,,,B1))

Cells start in A1 and the number of rows to be averaged is in cell B1

Regards

Trevor

>I am sure this is an easy answer for some of you, but I am not sure how to
>do
[quoted text clipped - 14 lines]
> THANKS again!
> John
Biff - 30 Sep 2006 21:24 GMT
Here's another one:

A1:A20 = range of values

C1 = number of values to be averaged starting from A1

=AVERAGE(A1:INDEX(A1:A20,C1))

If C1 is empty the formula will calculate the entire range.

If no numbers are in the range you'll get a #DIV/0! error. To prevent that
error:

=IF(COUNT(A1:A20),AVERAGE(A1:INDEX(A1:A20,C1)),"")

Biff

>I am sure this is an easy answer for some of you, but I am not sure how to
>do
[quoted text clipped - 14 lines]
> THANKS again!
> John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.