help making nested If statement shorter

dlmoore99

Board Regular
Joined
May 20, 2011
Messages
90
Office Version
  1. 2019
Platform
  1. MacOS
I am trying to make a vacation schedule starting the Monday before Memorial Day. I currently have a If statement that works but didn't know if I could make it shorter. I have tried an Index/Match and a Vlookup but I'm not getting the desired results as show in the sample. I am on a Mac in my profile but will be using this on PC with MS Office 365. I try for non array formula's just in case someone in the office tries to mess with them and don't know the Ctl+Shift+Enter. Any help would be greatly appreciated. Thank you.

J6 is the result that I am looking for.

Prime Time Vacation.xlsx
JKLM
5Current YearMemorial Day
619 May 2025202526 May 2025
725 May 2026
87/17/0531 May 2027
929 May 2028
10202528 May 2029
1127 May 2030
1226 May 2031
1331 May 2032
1430 May 2033
1529 May 2034
1628 May 2035
Prime Time
Cell Formulas
RangeFormula
J6J6=IF(YEAR(L6)=YEAR(M6),M6-7,IF(YEAR(L6)=YEAR(M7),M7-7,IF(YEAR(L6)=YEAR(M8),M8-7,IF(YEAR(L6)=YEAR(M9),M9-7,IF(YEAR(L6)=YEAR(M10),M10-7,IF(YEAR(L6)=YEAR(M11),M11-7,IF(YEAR(L6)=YEAR(M12),M12-7,IF(YEAR(L6)=YEAR(M13),M13-7,IF(YEAR(L6)=YEAR(M14),M14-7,"")))))))))
J8J8=INDEX(YEAR(M6:M16),MATCH(YEAR(L6),YEAR(M6:M16),0))
J10J10=VLOOKUP(YEAR(L6),YEAR(M6:M16),1,0)
 
See if the following formula works for you:
Excel Formula:
=WORKDAY.INTL(DATE(YEAR(L6),6,1),-2,"0111111")
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,226,837
Messages
6,193,249
Members
453,784
Latest member
Chandni

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