LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Calculate MEDIAN of Last x Rows in a Column

Assuming that you want the MEDIAN for the third column in your named
range 'DATA', try...

A2: 5

(This indicates that you want the MEDIAN for the last 5 numbers.)

B2:

=MATCH(9.99999999999999E+307,INDEX(Data,0,3))

C2:

=MEDIAN(INDEX(Data,B2-MIN(A2,B2)+1,3):INDEX(Data,B2,3))

Note that if there's less than 5 numbers available, the formula will
return the median for those numbers which are available.

Hope this helps!

In article <69ddde2a922ed@uwe, "Sam via OfficeKB.com" <u4102@uwe
wrote:

Hi All,

I have a dynamic named range called "Data" that houses numeric values and
empty text (""). "Data" spans 55 columns and many rows.

I would like a flexible Formula to exclude the cells with empty text ("") and
calculate the MEDIAN for individual columns say for the LAST 5 rows - number
of rows will vary. When the first row of empty text ("") is found in a column
all others rows below it will be empty text. I need to exclude the empty text
to find the actual LAST row with a numeric value and then start the
calculation of the MEDIAN from there.


I've tried variations on this array entered:

=MEDIAN(IF(NOT(ISERROR(INDEX(OFFSET(Data,0,0,,1),R OWS(Data)-5,1):INDEX(Data,
ROWS(Data),1)))<"",INDEX(OFFSET(Data,0,0,,1),ROWS (Data)-5,1):INDEX(Data,ROWS
(Data),1)))

Thanks Sam

 
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
How do I combine spreadsheets and documents in one file? Trish Excel Discussion (Misc queries) 3 November 9th 06 09:17 PM
Copy rows of one sheet into mutiple sheets based on column value Wesley Breshears Excel Discussion (Misc queries) 0 October 18th 06 03:19 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM


All times are GMT +1. The time now is 08:55 AM.

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"