Vlookup or Formula to pull the earliest and latest date.

nike

Board Regular
Joined
Feb 12, 2008
Messages
113
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I'm trying to do a vlookup without success to return the earliest and latest date in column K and column N, where it pulls the dates in Payment Applied tab (column C). Some clients will have several dates but i only need the earliest and latest date populate in column K and N. Also to calculate the day difference compared to Settle Date (column J), and to populate in column L and O. Once it has the day difference counts, if it has 1-5 days difference to put 2%, 5-15 to put 5%, and 15 and above to 10%, to populate in column M and P. If someone can please help with a formula to make this work, I'd greatly appreciate it. Thank you in advance!



Payment Late (tab)
1602972422734.png


Payment Applied (tab)
1602972505902.png
 

Attachments

  • 1602972222643.png
    1602972222643.png
    27.8 KB · Views: 79

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Which version of Excel do you use? Is the function MAXIFS available?
 
Upvote 0
Thanks for your replay, I have excel office 365, and it does have the MAXIFS function.
 
Upvote 0
Then you may use MINIFS and MAXIFS instead of VLookup. For example in K2:
Excel Formula:
=MAXIFS('Payment Applied'!$C$2:$C$100, 'Payment Applied'!$A$2:$A$100, A2)
(check the syntax on your real data)

Bye
 
Upvote 0
Thanks for the formula, unfortunately it wasn't working, but when i selected the whole columns it gave the dates with invalid dates which is not even in the range of the earliest and latest date for the client. Could it be the formatting of the dates?

=MAXIFS('Payments Applied'!$C:$C,'Payments LATE'!$A:$A,A2)
 
Upvote 0
=MAXIFS('Payments Applied'!$C:$C,'Payments LATE'!$A:$A,A2)
I don't have your workbook to test, but I seem you are filtering the wrong column: based on the images I think yu have to use
Excel Formula:
=MAXIFS('Payments Applied'!$C:$C,'Payments Applied'!$A:$A,A2)
I.e. you examine 'Payments Applied' column A; those rows whose value match A2 (in 'Payments Late') are used to calculate the Max value in column C

Or share a sample of your workbook and we will tune the formula

Bye
 
Upvote 0
Solution
Thank you Anthony47! That worked, very much appreciated :)
 
Upvote 0

Forum statistics

Threads
1,224,826
Messages
6,181,192
Members
453,021
Latest member
pingpong7117

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