Return MM/DD/YY date from MAX date in range

megera716

Board Regular
Joined
Jan 3, 2013
Messages
139
Office Version
  1. 365
Platform
  1. Windows
Not even sure how to word this concisely.

We pay our salespeople commission on the 20th of the month after a customer pays in full. I have 5 columns of payment dates for each customer and another column called Commission Month containing this formula:
=IF(AR2=0,MONTH(MAX(AC2,AE2,AG2,AI2,AK2))+1,"")

So if the customer's balance due is $0, take the latest month that they paid and then add 1 so it returns the next month and that's when I should pay the commission. Then I pivot that data filtered on Commission Month to put it all together in a pretty little format. This worked great halfway through the year last year when I came up with the formula but now I'm getting multiple years of data and need to make sure it keeps working great so I want it to return a full date in MM/DD/YY format.

If the latest date in the range is 1/1/22, I want it to return 2/20/22. If it's 1/31/22, it should still return 2/20/22. If the latest date is 2/7/22, it should return 3/20/22. And so on. Add 1 month, day is always the 20th.

I just have no clue how to word/write the formula for that. And it's really hard to Google it when you can't think of how to explain it in less than 4 paragraphs ?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,

If I understand correctly, this should do what you want.
Change/adjust cell references accordingly:

Book3.xlsx
ABCDEFGHIJK
14/20/2022
201/1/20221/31/20222/7/20223/2/2022
Sheet981
Cell Formulas
RangeFormula
B1B1=IF(A2=0,EOMONTH(MAX(C2,E2,G2,I2,K2),0)+20,"")
 
Upvote 0
Solution
Hi,

If I understand correctly, this should do what you want.
Change/adjust cell references accordingly:

Book3.xlsx
ABCDEFGHIJK
14/20/2022
201/1/20221/31/20222/7/20223/2/2022
Sheet981
Cell Formulas
RangeFormula
B1B1=IF(A2=0,EOMONTH(MAX(C2,E2,G2,I2,K2),0)+20,"")

Just gave it a shot, that is EXACTLY it. Thank you so much!!!
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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