Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 157
Default Retrieve data with MAX and VLOOKUP

I have a data table I'm trying to retrieve data from(to another worksheet)
that gives me the highest number in a list for a specific ID and only if the
#days is between 15 and 30.

For example:

Data table:
A B C

ID Type #days
80 MD 15
62 MD 22
28 MD 10
80 MD 28
62 MD 1

Would like to lookup the ID and give me the highest # days in the list for
those
with #days between 15 and 30.

So results for this would be:

ID Type #days
80 MD 28
62 MD 22

Can anyone help?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 915
Default Retrieve data with MAX and VLOOKUP

Tasha wrote:
I have a data table I'm trying to retrieve data from(to another worksheet)
that gives me the highest number in a list for a specific ID and only if the
#days is between 15 and 30.

For example:

Data table:
A B C

ID Type #days
80 MD 15
62 MD 22
28 MD 10
80 MD 28
62 MD 1

Would like to lookup the ID and give me the highest # days in the list for
those
with #days between 15 and 30.

So results for this would be:

ID Type #days
80 MD 28
62 MD 22

Can anyone help?



Supposing you have an ID to test in E2, this array* formula will do it:

=MAX(IF(($A$2:$A$6=E2)*($C$2:$C$6=15)*($C$2:$C$6< =30),C$2:$C$6))

*Commit the array formula by pressing Ctrl+Shift+Enter. Do not just
press Enter or Tab.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 157
Default Retrieve data with MAX and VLOOKUP

worked perfectly THANK YOU!!!

"smartin" wrote:

Tasha wrote:
I have a data table I'm trying to retrieve data from(to another worksheet)
that gives me the highest number in a list for a specific ID and only if the
#days is between 15 and 30.

For example:

Data table:
A B C

ID Type #days
80 MD 15
62 MD 22
28 MD 10
80 MD 28
62 MD 1

Would like to lookup the ID and give me the highest # days in the list for
those
with #days between 15 and 30.

So results for this would be:

ID Type #days
80 MD 28
62 MD 22

Can anyone help?



Supposing you have an ID to test in E2, this array* formula will do it:

=MAX(IF(($A$2:$A$6=E2)*($C$2:$C$6=15)*($C$2:$C$6< =30),C$2:$C$6))

*Commit the array formula by pressing Ctrl+Shift+Enter. Do not just
press Enter or Tab.

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
Retrieve VLOOKUP results based upon a conditional statement Raphael Excel Discussion (Misc queries) 5 January 22nd 09 01:31 AM
Vlookup to retrieve a hyperlink Roger on Excel Excel Discussion (Misc queries) 2 November 5th 07 03:46 PM
Can vlookup be used to retrieve multiple matches [email protected] Excel Discussion (Misc queries) 4 August 11th 07 07:20 PM
Retrieve multiple data rows data from a very long list and copy t mathew Excel Discussion (Misc queries) 1 September 13th 06 08:24 PM
vlookup doesn't retrieve subscript formatting Why? redmaple98 Excel Discussion (Misc queries) 1 April 28th 06 10:05 PM


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