Modifying Formula to Show Days Till Next Presidential Election Day.

Sh8dyDan

New Member
Joined
Dec 20, 2023
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I need some help figuring out how to modify these two formulas. They work as expected. Instead of showing a blank when not election or inauguration year I'd like to show days till the next date.

Presidential Election Day
Excel Formula:
=IF(MOD(YEAR(Timesheet!$E$22),4)=0,DATE(YEAR(Timesheet!$E$22),11,6)-(WEEKDAY(DATE(YEAR(Timesheet!$E$22),11,6))-2)+1,"")

Presidential Inauguration Day
Excel Formula:
=IF(MOD(YEAR(Timesheet!$E$22)-1,4)=0,DATE(YEAR(Timesheet!$E$22),1,20)+CHOOSE(WEEKDAY(DATE(YEAR(Timesheet!$E$22),1,20)),1,0,0,0,0,0,0),"")
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Could you give 2 or 3 examples of what might be in Timesheet!$E$22 and the corresponding results that you would want from the two modified formulas?
 
Upvote 0
Could you give 2 or 3 examples of what might be in Timesheet!$E$22 and the corresponding results that you would want from the two modified formulas?
Oh, sorry.
E22 on the Timesheet tab is just the starting date for a schedule
4/1/2024
 
Upvote 0
Oh, sorry.
E22 on the Timesheet tab is just the starting date for a schedule
4/1/2024
That does not provide the information that I requested.
Please also make it clear whether your dates are dmy or mdy format as we cannot tell from dates like 4/1/2024
 
Upvote 0
The Presidential Election Day formula will return the date for Tuesday after the first Monday of November for every year divisible by four. If the year is not divisible by four it will be FALSE and blank. Instead of showing blank, I'd like it to show days remaining until the formula is TRUE.
 
Upvote 0
That does not provide the information that I requested.
Please also make it clear whether your dates are dmy or mdy format as we cannot tell from dates like 4/1/2024
The date is in M/D/Y format.
 
Upvote 0
N.B. You can post a concise example of your sheet with the forum's tool named XL2BB.
• provide a clear explanation of what you are trying to calculate

T202401a.xlsm
EFGHIJ
33032024Tue Nov 5, 2024
4Tue 05-Nov-242028Tue Nov 7, 2028
5or2032Tue Nov 2, 2032
615-Apr-24Tue 05-Nov-24204204
720-Nov-24Tue 07-Nov-2814481448
1e
Cell Formulas
RangeFormula
E3E3=DATE(2024,11,5)-TODAY()
J3:J5J3=WORKDAY.INTL(DATE(I3,11,0),1,"0111111")+1
F6:F7F6=XLOOKUP(E6,$J$3:$J$5,J$3:J$5,,1)
G6:G7G6=F6-E6
H6:H7H6=XLOOKUP(E6,$J$3:$J$5,J$3:J$5,,1)-E6
 
Upvote 0
The date is in M/D/Y format.
Thanks. That addresses my latest point, but not the first.

• provide a clear explanation of what you are trying to calculate
I'm not criticising your request at all but for me, I don't want explanation as we have quite a bit of that. I would like concrete examples of the actual expected results for both formulas for a few dates in different (not divisible by 4) years.
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,243
Members
449,093
Latest member
Vincent Khandagale

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