Find a Max Date based on a corresponding value VBA

jimalya

New Member
Joined
May 25, 2013
Messages
2
Find a Max Date based on a corresponding value VBA
Find a Max Date based on a corresponding value VBA
http://www.mrexcel.com/forum/newthread.php?do=newthread&f=10


Hello everyone,

I'm in the process of trying to figure out how to find the max date of a value in column A. From there I need to link up the price associated with that date. VBA is preferred. The information I'm working with is structured like this in this image:

attachment.php

What I want to do using VBA, is to look at the values in column A and for each of them, find the max date or most recent date. Once that is determined, on a new sheet, I want to write the value found in column A in sheet2/ColumnA and the date in column B, and the price in column C. In a nutshell, I'm looking for an effective date for pricing. The example on the bottom is basically what I'd like to extract with code onto another sheet.

I've tried doing it with a pivot table with no success, and I tried a little bit with the scripting.dictionary, but that's kind of confusing to me. If anyone could help with this, it would be much appreciated.

Note to add is that this data is dynamic and is updated daily. However the structure is constant.

thanks,
jimalya
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,102
Messages
6,123,099
Members
449,096
Latest member
provoking

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