How to get the last date for each 12 Mths?

Mathman

Board Regular
Joined
Jan 28, 2017
Messages
152
Office Version
  1. 2016
Platform
  1. Windows
Hi


Would you know how I would get the last (highest day) value for each months?


IN the example for the month of January the last date is January 28 and I need to get the value next to it which is 162.


I need a formulae range that would include the entire year that gets the values for each month so I can cut and past it over other years with no need for adjustment.


Here is the example. If you can help that would be great!


Thank you


[TABLE="width: 266"]
<tbody>[TR]
[TD="width: 64, bgcolor: transparent, align: left"]Col A[/TD]
[TD="width: 64, bgcolor: transparent, align: left"]Col B[/TD]
[TD="width: 74, bgcolor: transparent, align: left"]Col C[/TD]
[TD="width: 64, bgcolor: transparent, align: left"]Col D[/TD]
[/TR]
[TR]
[TD="bgcolor: #808080"]2016[/TD]
[TD="bgcolor: #808080"]Value[/TD]
[TD="bgcolor: #808080"]Mths[/TD]
[TD="bgcolor: #808080"]Results[/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]7-Jan-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 147.00 [/TD]
[TD="bgcolor: transparent, align: left"]January[/TD]
[TD="bgcolor: transparent, align: left"]$ 162.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]14-Jan-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 148.00 [/TD]
[TD="bgcolor: transparent, align: left"]February[/TD]
[TD="bgcolor: transparent, align: left"]$ 175.00 [/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]21-Jan-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 149.00 [/TD]
[TD="bgcolor: transparent, align: left"]March[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]28-Jan-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 162.00 [/TD]
[TD="bgcolor: transparent, align: left"]April[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]4-Feb-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 188.00 [/TD]
[TD="bgcolor: transparent, align: left"]May[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]11-Feb-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 195.00 [/TD]
[TD="bgcolor: transparent, align: left"]June[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]19-Feb-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 202.00 [/TD]
[TD="bgcolor: transparent, align: left"]July[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]25-Feb-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 175.00 [/TD]
[TD="bgcolor: transparent, align: left"]August[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]3-Mar-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 191.00 [/TD]
[TD="bgcolor: transparent, align: left"]September[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]10-Mar-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 200.00 [/TD]
[TD="bgcolor: transparent, align: left"]October[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]17-Mar-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 186.00 [/TD]
[TD="bgcolor: transparent, align: left"]November[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]24-Mar-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 189.00 [/TD]
[TD="bgcolor: transparent, align: left"]December[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]30-Mar-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 190.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]7-Apr-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 200.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]14-Apr-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 211.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]21-Apr-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 205.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]28-Apr-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 231.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]5-May-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 232.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]12-May-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 232.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]19-May-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 236.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]26-May-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 210.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]2-Jun-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 238.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]9-Jun-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 251.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]16-Jun-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 266.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]23-Jun-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 268.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]29-Jun-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 281.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]7-Jul-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 306.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]14-Jul-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 326.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]22-Jul-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 316.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]29-Jul-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 331.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]4-Aug-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 331.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]11-Aug-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 318.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]18-Aug-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 297.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]25-Aug-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 274.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]1-Sep-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 289.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]8-Sep-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 284.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]16-Sep-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 279.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]23-Sep-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 291.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]29-Sep-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 282.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]6-Oct-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 259.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]13-Oct-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 256.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]20-Oct-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 278.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]28-Oct-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 259.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]3-Nov-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 259.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]10-Nov-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 197.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]17-Nov-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 203.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]24-Nov-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 199.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]1-Dec-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 209.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]8-Dec-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 225.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]15-Dec-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 202.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]22-Dec-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 217.00 [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #000000"]29-Dec-12[/TD]
[TD="bgcolor: transparent, align: left"]$ 233.00 [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Book1
ABCD
12016ValueMthsResults
207-Jan-12$ 147.00January$ 162.00
314-Jan-12$ 148.00February$ 175.00
421-Jan-12$ 149.00March$ 190.00
528-Jan-12$ 162.00April$ 231.00
604-Feb-12$ 188.00May$ 210.00
711-Feb-12$ 195.00June$ 281.00
819-Feb-12$ 202.00July$ 331.00
925-Feb-12$ 175.00August$ 274.00
1003-Mar-12$ 191.00September$ 282.00
1110-Mar-12$ 200.00October$ 259.00
1217-Mar-12$ 186.00November$ 199.00
1324-Mar-12$ 189.00December$ 233.00
1430-Mar-12$ 190.00
1507-Apr-12$ 200.00
1614-Apr-12$ 211.00
1721-Apr-12$ 205.00
1828-Apr-12$ 231.00
1905-May-12$ 232.00
2012-May-12$ 232.00
2119-May-12$ 236.00
2226-May-12$ 210.00
2302-Jun-12$ 238.00
2409-Jun-12$ 251.00
2516-Jun-12$ 266.00
2623-Jun-12$ 268.00
2729-Jun-12$ 281.00
2807-Jul-12$ 306.00
2914-Jul-12$ 326.00
3022-Jul-12$ 316.00
3129-Jul-12$ 331.00
3204-Aug-12$ 331.00
3311-Aug-12$ 318.00
3418-Aug-12$ 297.00
3525-Aug-12$ 274.00
3601-Sep-12$ 289.00
3708-Sep-12$ 284.00
3816-Sep-12$ 279.00
3923-Sep-12$ 291.00
4029-Sep-12$ 282.00
4106-Oct-12$ 259.00
4213-Oct-12$ 256.00
4320-Oct-12$ 278.00
4428-Oct-12$ 259.00
4503-Nov-12$ 259.00
4610-Nov-12$ 197.00
4717-Nov-12$ 203.00
4824-Nov-12$ 199.00
4901-Dec-12$ 209.00
5008-Dec-12$ 225.00
5115-Dec-12$ 202.00
5222-Dec-12$ 217.00
5329-Dec-12$ 233.00
Sheet1
Cell Formulas
RangeFormula
D2{=INDEX($B$2:$B$53,MAX(IF(MONTH($A$2:$A$53)=ROWS($D$2:$D2),ROW($A$2:$A$53)-ROW($A$2)+1)))}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0
It works great, thank you very much for your help.

Regards,
MM
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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