Return Value based on max date

Steves73

Board Regular
Joined
Oct 19, 2016
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All

This one has got me

Trying to find a formula to be put in cell C2 that looks in column B, finds the first min date based on the month reference in A2 (Note some dates repeat) in this case 03-Feb-24 in Cell B10 as this is the lowest and first data set typed in and then returns it, the formula uses "Feb-24" in Cell A2 as the reference for which give the formula the month to look for. If we can It would be great to have the adjacent value in Column C returned in C3, in this case EGP 68,470.00

Cell D4 will need the same but this looks for the highest date value within the month and again returns the adjacent value from column C

I Hope I have explained this correctly



1709996805354.png
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try
C2:
Excel Formula:
=MINIFS(B6:B29,A6:A29,A2)

D2:
Excel Formula:
=MAXIFS(B6:B29,A6:A29,A2)

C3:
Excel Formula:
=VLOOKUP(C2,$B$6:$C$29,2)

D3:
Excel Formula:
=VLOOKUP(D2,$B$6:$C$29,2)
 
Upvote 0
MIN values

Cell C2:
Excel Formula:
=MIN(FILTER(B6:B29,MONTH(B6:B29)=MONTH(A2)))

Cell C3:
Excel Formula:
=XLOOKUP(C2,B6:B29,C6:C29)


MAX values
Cell D2:
Excel Formula:
=MAX(FILTER(B6:B29,MONTH(B6:B29)=MONTH(A2)))

Cell D3
Excel Formula:
=INDEX(C6:C29,MAX(FILTER(ROW(B6:B29),B6:B29=D2))-ROW($C$6)+1)
 
Upvote 0
Thanks mate, Perfect, thanks for your help.

As a couple of dates repeat (3-Feb-24) the Vlookup picks up the second one, I tried Xlookup and that seemed to work
 
Upvote 0
Another in C2 only
Excel Formula:
=TOCOL(TAKE(FILTER(B6:C100,MONTH(B6:B100)=MONTH(A2)),1))
and in D2 only
Excel Formula:
=TOCOL(TAKE(FILTER(B6:C100,MONTH(B6:B100)=MONTH(A2)),-1))
 
Upvote 0
Solution
Thanks all

All of your suggestions worked well, thanks again
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,974
Members
449,095
Latest member
Mr Hughes

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