Formula to lookup last day of a month and return the value next to it (Max + If function?)

Mr Retirement

New Member
Joined
Nov 12, 2016
Messages
46
Hi Everyone -

This might be explained easiest by the sample table below. I'm looking for a formula that will take my inputs (Month & Year) and return the value from the last available date in that month/year from the table.

Month:
3
Year:
2013
NEEDED FORMULA:
1563
Data:
Helper Column (if needed)
Date
Value
03201301
3/1/2013
1500
03201304
3/4/2013
1502
03201315
3/15/2013
1505
03201328
3/28/2013
1563
04201303
4/3/2013
1600
etc...

<tbody>
</tbody>

Any help would be appreciated :)

Thanks,
Mr R.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Excel 2010
ABCD
1Month:3
2Year:2013
3NEEDED FORMULA:15631563
4
5
6Data:
7Helper Column (if needed)DateValue
832013013/1/20131500
932013043/4/20131502
1032013153/15/20131505
1132013283/28/20131563
1242013034/3/20131600
Sheet2
Cell Formulas
RangeFormula
D3=LOOKUP(2,1/(MONTH($B$8:$B$12)=C1),$C$8:$C$12)


=LOOKUP(2,1/IF(MONTH($B$8:$B$13)=C1,IF(YEAR($B$8:$B$13)=C2,1)),$C$8:$C$13) ctrl-shift-enter if you want different years
 
Last edited:
Upvote 0
This is actually better:


Excel 2010
BCD
1Month:3
2Year:2013
3NEEDED FORMULA:15631563
4
5
6
7DateValue
83/1/20131500
93/4/20131502
103/15/20131505
113/28/20131563
124/3/20131600
133/4/20141622
Sheet2
Cell Formulas
RangeFormula
D3=LOOKUP(2,1/(TEXT($B$8:$B$13,"myyyy")=C1&C2),$C$8:$C$13)
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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