Please help with lookup for last date of the month & value

yanyanyan

New Member
Joined
Nov 13, 2014
Messages
24
Hi

I need help with a formula to find out highlighted yellow cells. For example, I need to find out the last date balance for Machine #1 in July 18, table on the right have 31 Jul 18 balance of $500..

Thanks!
image003.png


d4uZjT
image003.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
There are no cell references which isn't helpful, therefore.
Assuming "Opening Bal" is in B1...

in C2
=INDEX(J3:J8,MATCH(EOMONTH(C1,0),E3:E8,0),1)
in C3
=INDEX(J13:J18,MATCH(EOMONTH(C1,0),E13:E18,0),1)

Adjust the formulas to match your spreadsheet, this part of the solution is down to you.


Because of the layout of your Machine # tables you'll need to change the ranges in each formula.
The layout you have of Machine# tables is not the best way to do this.


UPDATE: This won't work for machine #2 as the last date is not end of month.
Thinking...
 
Last edited:
Upvote 0
in C2
=INDEX(J3:J8,MATCH(MAX(IF(MONTH(C1)=MONTH(E$3:E$8),E3:E8)),E3:E8,0),1)
in C3
=INDEX(J13:J18,MATCH(MAX(IF(MONTH(C1)=MONTH(E$3:E$8),E3:E8)),E3:E8,0),1)

These are both
Array formula, use Ctrl-Shift-Enter
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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