Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Picking the latest entries from a column

I have a problem I'm trying to solve for my spreadsheet. I have a column of
data which I'm trying to use the latest 20 entries and get the average of
the ten smallest values of those 20. How do I accomplish this? In my
current setup, the user will always enter the new data on the last row and
so the lastest 20 values will be the 20 rows from the bottom.

In the mean time, I've rearranged the data entry in descending order so that
the latest one is on top and I can just look at the top 20 cells.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Picking the latest entries from a column


Sub ABBB()
Dim rng As Range
Dim rng1 As Range
Dim sForm As String
Set rng = Cells(Rows.Count, 1).End(xlUp)
Set rng1 = rng.Offset(-19, 0).Resize(20, 1)
sForm = "Average(small(" & rng1.Address & _
",{1,2,3,4,5,6,7,8,9,10}))"
MsgBox Evaluate(sForm)

End Sub


--
Regards,
Tom Ogilvy



"<<<Golf4U" wrote in message
news:BSoWc.61$A8.29@edtnps89...
I have a problem I'm trying to solve for my spreadsheet. I have a column

of
data which I'm trying to use the latest 20 entries and get the average of
the ten smallest values of those 20. How do I accomplish this? In my
current setup, the user will always enter the new data on the last row and
so the lastest 20 values will be the 20 rows from the bottom.

In the mean time, I've rearranged the data entry in descending order so

that
the latest one is on top and I can just look at the top 20 cells.

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
Picking a value from a table using Column and Row ranges? James Dalton[_2_] Excel Worksheet Functions 2 May 20th 08 11:02 PM
Picking up the latest text value in a column djmagcruznyc Excel Worksheet Functions 5 May 5th 08 09:01 PM
Picking up last value in column in Excel surreygraham Excel Worksheet Functions 3 February 16th 08 12:38 AM
Picking out column in named range Basil Excel Worksheet Functions 2 September 2nd 06 10:45 AM
Picking one column of info scott45 Excel Worksheet Functions 0 October 25th 05 06:16 PM


All times are GMT +1. The time now is 05:12 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"