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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,224,823
Messages
6,181,184
Members
453,020
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