Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Average of Unknown Range

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

That works.
Could I do the same type of thing for a straight average?
B1: =AVERAGE(A2:INDEX(A:A,MATCH(10^99,A:A)))

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #5   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike



  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Average of Unknown Range

Try this:

B1l: (a numeric value)
C1: =AVERAGE(A2:INDEX(A:A,(B1-1)))

Is that what you're looking for?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #7   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

I pasted that in and it worked.
Now, any chance you could explain it a little?
I don't see the purpose of the "A:A" preceding the "(B1-1)"

Mike


"Ron Coderre" wrote:

Try this:

B1l: (a numeric value)
C1: =AVERAGE(A2:INDEX(A:A,(B1-1)))

Is that what you're looking for?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #8   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

Sorry Ron,

I shouldn't have posted so quickly. After further analysis I see the
structure of the formula.

Thanks again,
Mike


"Ron Coderre" wrote:

Try this:

B1l: (a numeric value)
C1: =AVERAGE(A2:INDEX(A:A,(B1-1)))

Is that what you're looking for?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #9   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Average of Unknown Range

OK...Here's the explanation:

Regarding: INDEX(A:A,(B1-1))

The INDEX function starts with a range and returns a reference to a cell in
that range as indicated by the RowRef and ColRef arugments.

Example:
In =INDEX(A5:C10,2,3) we start with the range A5:C10 and isolate the cell
that is in the second row and third column of that grid....C6.

In our case, the range A:A refers to a single column so no ColRef is required.
Since you could choose ANY row in Col_A to be the last cell referenced by
the formula we have to assume that it could be anywhere in Col_A. Hence, the
A:A reference.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I pasted that in and it worked.
Now, any chance you could explain it a little?
I don't see the purpose of the "A:A" preceding the "(B1-1)"

Mike


"Ron Coderre" wrote:

Try this:

B1l: (a numeric value)
C1: =AVERAGE(A2:INDEX(A:A,(B1-1)))

Is that what you're looking for?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

  #10   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Average of Unknown Range

Great explanation.

Thanks!

"Ron Coderre" wrote:

OK...Here's the explanation:

Regarding: INDEX(A:A,(B1-1))

The INDEX function starts with a range and returns a reference to a cell in
that range as indicated by the RowRef and ColRef arugments.

Example:
In =INDEX(A5:C10,2,3) we start with the range A5:C10 and isolate the cell
that is in the second row and third column of that grid....C6.

In our case, the range A:A refers to a single column so no ColRef is required.
Since you could choose ANY row in Col_A to be the last cell referenced by
the formula we have to assume that it could be anywhere in Col_A. Hence, the
A:A reference.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I pasted that in and it worked.
Now, any chance you could explain it a little?
I don't see the purpose of the "A:A" preceding the "(B1-1)"

Mike


"Ron Coderre" wrote:

Try this:

B1l: (a numeric value)
C1: =AVERAGE(A2:INDEX(A:A,(B1-1)))

Is that what you're looking for?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I take it from the two responses I've received that it is not possible to
take the value in a cell and use it as a pointer to a cell?
i.e. B1=400
So, C1=AVERAGE(A2:A,(B1-1)
would come out to be
C1=AVERAGE(A2:A399)

Mike


"Ron Coderre" wrote:

Try something like this:

for a list if values (or blanks) beginning in A2 and ending with the
location of the last numeric value in Col_A:

This formula returns the average of the smallest 5 numeric cells:
B1: =AVERAGE(SMALL(A2:INDEX(A:A,MATCH(10^99,A:A)),{1,2 ,3,4,5}))


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Mike" wrote:

I am trying to take an average of a changing range of numbers.
The range always starts at A2 but ends at different rows of column A.
If I'm using the formula =AVERAGE(SMALL(A2:A??,{1,2,3,4,5})), how do I
determine A?? (the last row containing data).
Note: I have a field that contains the next available row number, so I could
use it minus 1 except I don't know how to get the formula to use this value.

Thanks for any help.
Mike

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
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
What is this kind of average called? havocdragon Excel Worksheet Functions 3 June 24th 05 05:10 PM
formula to calculate the average of a range basing on condition Krishna Mohan Excel Worksheet Functions 4 June 21st 05 11:26 AM
average of visible cells in a filtered range dave roth Excel Worksheet Functions 5 May 23rd 05 12:56 PM


All times are GMT +1. The time now is 01:18 PM.

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

About Us

"It's about Microsoft Excel"