IF THEN Formula Help

cddexcel

New Member
Joined
Dec 19, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello. I'm looking for assistance with an IF THEN formula with regard to dates.
For example, if I have a date of 12/19/24 and I only want the next Monday date to populate, how would I code this? I have a drop down list of Monday or Thursday in my spreadsheet and depending on which is chosen as well as the initial date, I want the following Monday or Thursday date to populate in the cell.
Example: Date is 1/3/24 (in it's own cell) and I choose Monday in the drop down list (in it's own cell). What should the formula be so that 1/8/24 populates?
Thank you!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Assuming your date is on A1, and Monday/Thursday flag is on B1 then

Excel Formula:
=IF(B1="Monday",IF(WEEKDAY(A1)=1,A1+1,(9-WEEKDAY(A1))+A1),IF(B1="Thursday",IF(WEEKDAY(A1)<5, (5-WEEKDAY(A1))+A1, (12-WEEKDAY(A1))+A1),""))
 
Upvote 0
Another option:
Book1
AB
112/20/23Monday
2
312/25/23
Sheet1
Cell Formulas
RangeFormula
A3A3=A1+(7-WEEKDAY(A1,IFS(B1="Monday",2,B1="Thursday",14))+1)
Cells with Data Validation
CellAllowCriteria
B1List=$D$1:$D$2


Book1
AB
112/20/23Thursday
2
312/21/23
Sheet1
Cell Formulas
RangeFormula
A3A3=A1+(7-WEEKDAY(A1,IFS(B1="Monday",2,B1="Thursday",14))+1)
Cells with Data Validation
CellAllowCriteria
B1List=$D$1:$D$2
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,275
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