Solved

Return date associated with maximum value

Posted on 2014-02-17
3
150 Views
Last Modified: 2014-02-17
This question relates to the same data set from a previous question: http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_28363479.html

For each "Site", I would like to obtain the value for "SampDate" associated with the maximum values in columns H, I, and J. The results should appear in columns K, L, and M.

I think that VLOOKUP may be able to do this, but I am unsure of the proper syntax.

Many thanks in advance for any potential solutions!
0
Comment
Question by:dougf1r
  • 2
3 Comments
 
LVL 1

Author Comment

by:dougf1r
ID: 39866113
To clarify, the ranges of data from which to search for the maximum values for each site are in columns H, I, and J. For example, for the first site (04CEF-1) I would like to be able to identify the SampDate associated with the maximum value from the range of values in rows 5 through 90 for each column H, I, and J.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39866193
Hello dougflr,

I used this "array formula" in K5 confirmed with CTRL+SHIFT+ENTER and copied across 3 columns and all the way down.

=IF(AND($J4="",$J5<>""),INDEX($C5:$C200,MATCH(MAX(IF($B5:$B200=$B5,H5:H200)),H5:H200,0)),"")

That will give you the SampDate associated with the max value on the first row of average data for each site.

To "array enter" a formula you can put the formula in a cell, select that cell and press F2 key to select formula - now hold down CTRL and SHIFT keys and press ENTER. If done correctly curly braces will appear around the formula. If you change the formula this needs to be re-done....but only for first formula - it can then be copied

See attached

regards, barry
maxdate-barry.xlsx
0
 
LVL 1

Author Comment

by:dougf1r
ID: 39866302
Thanks barry! This works perfectly.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question