choose data based on dates

MoneyPlanters

New Member
Joined
Apr 9, 2011
Messages
41
A B C D E F

Ticker Date/Time Open High Low Close
CAC40 1/2/2008 5609.98 5665.94 5530.43 5550.36
CAC40 1/3/2008 5538.2 5559.05 5515.61 5546.08
CAC40 1/4/2008 5543.69 5567.09 5417.53 5446.79
CAC40 1/7/2008 5432 5475.25 5429.32 5452.83
CAC40 1/8/2008 5476.51 5533.93 5471.14 5495.67
CAC40 1/9/2008 5459.4 5463.07 5420.06 5435.42
CAC40 1/10/2008 5468.54 5471.82 5394.52 5400.43
CAC40 1/11/2008 5398.49 5410.91 5349.25 5371.41
CAC40 1/14/2008 5345.83 5421.22 5343.25 5403.51
CAC40 1/15/2008 5390.37 5394.14 5250.09 5250.82
CAC40 1/16/2008 5216.22 5289.05 5177.68 5225.39
CAC40 1/17/2008 5278.29 5278.5 5150.24 5157.09
CAC40 1/18/2008 5159.56 5231.56 5081.23 5092.4


Column B contains dates and I need to pick data from columns C,D,E and F from the row which contains the latest date. How can this be achieved ? For example, K4, L4, M4 and N4 automatically gets filled with the data from columns C,D,E and F respectively which correspond to the latest date in column B.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
A B C D E F

Ticker Date/Time Open High Low Close
CAC40 1/2/2008 5609.98 5665.94 5530.43 5550.36
CAC40 1/3/2008 5538.2 5559.05 5515.61 5546.08
CAC40 1/4/2008 5543.69 5567.09 5417.53 5446.79
CAC40 1/7/2008 5432 5475.25 5429.32 5452.83
CAC40 1/8/2008 5476.51 5533.93 5471.14 5495.67
CAC40 1/9/2008 5459.4 5463.07 5420.06 5435.42
CAC40 1/10/2008 5468.54 5471.82 5394.52 5400.43
CAC40 1/11/2008 5398.49 5410.91 5349.25 5371.41
CAC40 1/14/2008 5345.83 5421.22 5343.25 5403.51
CAC40 1/15/2008 5390.37 5394.14 5250.09 5250.82
CAC40 1/16/2008 5216.22 5289.05 5177.68 5225.39
CAC40 1/17/2008 5278.29 5278.5 5150.24 5157.09
CAC40 1/18/2008 5159.56 5231.56 5081.23 5092.4


Column B contains dates and I need to pick data from columns C,D,E and F from the row which contains the latest date. How can this be achieved ? For example, K4, L4, M4 and N4 automatically gets filled with the data from columns C,D,E and F respectively which correspond to the latest date in column B.
If the dates in column B are in ascending order...

J4:

=MATCH(9.99999999999999E+307,$B$2:$B$14)

K4, copy across to N4:

=INDEX(C$2:C$14,$J$4)
 
Upvote 0
Could you please explain the logic ? That will add to my understanding.

The MATCH formula with the big number (see "limits" in Excel's Help) returns
the position of the last numeric value from the date range in column B. The following link
describes how it works:

http://www.mrexcel.com/forum/showthread.php?t=310278 (post #7)

The Index formula fetches the corresponding values from the associated ranges
at the calculated position.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,242
Members
452,898
Latest member
Capolavoro009

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