If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel formula. finding the last 10

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-10, 15:54
freeman77 freeman77 is offline
Registered User
 
Join Date: May 2010
Posts: 8
Excel formula. finding the last 10

Hi could someone help me.

I am trying to figure out an excel formula to caluclate the average of the last ten numbers.

I have three columns:

Column 1 - Date
Column 2 - Name
Column 3 - Levels

My rows exceed down to 708.

Please help!!!!
Reply With Quote
  #2 (permalink)  
Old 05-10-10, 19:31
CariNet CariNet is offline
Registered User
 
Join Date: May 2010
Location: San Diego, CA
Posts: 2
=average()

Here's an example...
=average(C2:C9)

It will take the average of C2 to C9.
Reply With Quote
  #3 (permalink)  
Old 05-10-10, 20:36
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
When you say "last ten numbers", do you mean the last ten numbers physically within a column, or do you mean the ten smallest numbers in the column?
__________________
Colin

My Excel articles

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #4 (permalink)  
Old 05-10-10, 21:05
freeman77 freeman77 is offline
Registered User
 
Join Date: May 2010
Posts: 8
I should clarify. I mean the last ten numbers at the end. Followed by another formula that will only take the last 20. I can do it by the =average() formula but my length chances every time. So I need it to do it automatically. After I refresh my page via a queries.
Is this making a little more sense?
Reply With Quote
  #5 (permalink)  
Old 05-10-10, 21:32
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
Assuming the numbers are contiguous - there are no spaces:

Define the following named formula:
Code:
BIGNUM 
=9.99999999999999E+307
Then, assuming the last ten numbers you want to sum are in column D, use this:
Code:
=AVERAGE(INDEX(D:D,MATCH(BIGNUM,D:D)-10+1):INDEX(D:D,MATCH(BIGNUM,D:D)))
or variation thereof.

Hope that helps...
__________________
Colin

My Excel articles

Other tutorials:
Array Formulas | Deleting Rows with VBA

Last edited by Colin Legg; 05-10-10 at 21:38.
Reply With Quote
  #6 (permalink)  
Old 05-10-10, 23:20
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,307
I've moved this thread into the Excel forum.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #7 (permalink)  
Old 05-11-10, 14:40
freeman77 freeman77 is offline
Registered User
 
Join Date: May 2010
Posts: 8
It worked!!!!! Thank you so much! I have been trying different formulas out for days with no luck. You really saved me.

THANKS AGAIN!!!!!
Reply With Quote
  #8 (permalink)  
Old 05-11-10, 17:58
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
You're welcome. The numbers being together made the formula simpler than it would have been otherwise.
__________________
Colin

My Excel articles

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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