Lookup Maximum Date and Corresponding Adjacent Value in Array with Column Specified by Referenced Criteria

bkanne

New Member
Joined
Nov 14, 2013
Messages
10
Using the Federal Reserve Bank of St. Louis' Add-In, I am able to download historical rate data for multiple different securities (10-Year Treasury, 3-Month LIBOR, etc.) This is incredibly useful because I can update this data with by simply running the macro and it gives me all the historical data alongside the newest information.

The information looks like this after I run the Macro:

A
B
C
D
1
DGS3MODGS1
2
linPercentlinPercent
3
DDailyDDaily
4
01/01/19001982-01-04 to 2015-02-1801/01/19001962-01-02 to 2015-02-18
5
3-Month Treasury1-Year Treasury
6
Board of GovernorsBoard of Governors
7
DateValueDate
Value
8
01/04/198211.901/02/19624.1
9
01/05/198212.201/03/19624.0
10
01/06/198212.201/04/19624.0
11
01/07/198212.201/05/19624.0
12
01/08/198212.001/06/19625.0
13
01/09/198212.301/07/19624.0
14
etc...etc...etc...etc...

<tbody>
</tbody>

The data extends all the way down until the date with the latest information.

On a different tab, I need to be able to lookup what the maximum date in each range is and corresponding value next to it by identifying date column/corresponding value column via the codes present in A1 (DGS3MO) and A3 (DGS1). Of course, it has to adapt to when I update the macro and new dates and values are added. In addition, I have a bunch more rates than what I have shown in the example, so it would be great if the formulas wouldn't be restricted to just these four columns, but also included the ability to adapt to adding new columns as well.

I've tried a variety of different vlookup, hlookup, and index/match combinations but just haven't been able to get it to work. Any help would be GREATLY appreciated. Thank you so much!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top