Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tammi
 
Posts: n/a
Default Find min/max in 2 combined columns

I am trying to find the lowest, highest, and average age based on a large
list. The ages are in terms of years and months, and do not rely on
birthdates.
A B
Years Months
1 2 10
2 5 6
3 4 8
4 2 9

Is this possible??
Thanks


  #2   Report Post  
Ken Wright
 
Posts: n/a
Default

Assuming years in A2:A30 and months in B2:B30

MAX
=====================================
=SUMPRODUCT(MAX((A2:A30)+((B2:B30)/12)))
will give for example 5.83

=MAX(A2:A30)&" Yr(s) &
"&(12*MOD(SUMPRODUCT(MAX((A2:A30)+((B2:B30)/12))),1))&" Mths"
will give for example 5 Yrs & 10 Mths


MIN
=====================================
=SUMPRODUCT(MIN((A2:A30)+((B2:B30)/12)))
will give for example 1.25

=MIN(A2:A30)&" Yr(s) &
"&(12*MOD(SUMPRODUCT(MIN((A2:A30)+((B2:B30)/12))),1))&" Mths"
will give for example 1 Yr(s) & 3 Mths

Assumes no blanks in your data.


AVG
=====================================
=AVERAGE(A2:A30)+(AVERAGE(B2:B30)/12)
will give for example 3.52

=FLOOR(AVERAGE(A2:A30)+(AVERAGE(B2:B30)/12),1)&" Yr(s) &
"&TEXT((12*MOD(AVERAGE(A2:A30)+(AVERAGE(B2:B30 )/12),1)),"0.0")&" Mths)"
will give for example 3 Yrs & 6.2 Mths

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Tammi" wrote in message
...
I am trying to find the lowest, highest, and average age based on a large
list. The ages are in terms of years and months, and do not rely on
birthdates.
A B
Years Months
1 2 10
2 5 6
3 4 8
4 2 9

Is this possible??
Thanks




  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default

Using your example (in cells A1:C5):

Max =SUMPRODUCT(MAX((B2:B5)+(C2:C5)/12))
Min =SUMPRODUCT(MIN((B2:B5)+(C2:C5)/12))
Avg =SUMPRODUCT(((B2:B5)+(C2:C5)/12))/COUNT(B2:B5)

Or you could use array formulas (committed with [Ctrl]+[Shift]+[Enter]):
Max =MAX((B2:B5)+(C2:C5)/12)
Min =MIN((B2:B5)+(C2:C5)/12)
Avg =AVERAGE(((B2:B5)+(C2:C5)/12))

Does that help?
--
Regards,
Ron


"Tammi" wrote:

I am trying to find the lowest, highest, and average age based on a large
list. The ages are in terms of years and months, and do not rely on
birthdates.
A B
Years Months
1 2 10
2 5 6
3 4 8
4 2 9

Is this possible??
Thanks



  #4   Report Post  
Ken Wright
 
Posts: n/a
Default

Note though, that one set of answers gives you a numeric result and the
other gives you a text result.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------


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
How do I find the cell address of the 2nd largest of a set? Mr. Snrub Excel Discussion (Misc queries) 4 May 30th 05 12:53 PM
Tab Stop across Columns [email protected] Excel Worksheet Functions 3 March 13th 05 03:45 AM
identify numbers which are listed in two columns. the_kane Excel Worksheet Functions 1 March 8th 05 06:21 AM
Filtering Text Data from Multiple columns Brad Excel Worksheet Functions 6 January 1st 05 03:32 PM
combining 3 columns of same info for a pivot table Julie Excel Worksheet Functions 0 December 15th 04 03:12 PM


All times are GMT +1. The time now is 09:50 AM.

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

About Us

"It's about Microsoft Excel"