Need help with date and if statement newbie
Solved/Closed
T
-
Feb 18, 2015 at 03:16 AM
cmarzahn Posts 35 Registration date Wednesday February 18, 2015 Status Member Last seen March 13, 2015 - Feb 20, 2015 at 10:18 AM
cmarzahn Posts 35 Registration date Wednesday February 18, 2015 Status Member Last seen March 13, 2015 - Feb 20, 2015 at 10:18 AM
Related:
- Need help with date and if statement newbie
- More than 1 if statement excel - Guide
- Fenix internet on bank statement - Guide
- If statement with dates - Guide
- Which two sentences correctly describe the use of formulas in performing calculations in spreadsheets? all formulas written for a spreadsheet must follow certain rules, which we call syntax. when creating a formula in a spreadsheet, always start with an if statement. basic statements include numeric values and operators. if there are multiple operators, then the order of precedence starts with exponents. parentheses are used to isolate certain parts of the expression from the other parts. operations in parentheses are completed after the rest of the formula is evaluated. - Excel Forum
- Help with If VBA Statement ✓ - Excel Forum
3 responses
RayH
Posts
122
Registration date
Tuesday August 31, 2010
Status
Contributor
Last seen
June 20, 2016
26
Feb 18, 2015 at 11:22 AM
Feb 18, 2015 at 11:22 AM
Assuming the date is in Cell A1, formula goes in B1:
=IF(AND(DAY(A1)>=1, DAY(A1)<=15),DATE(YEAR(A1),MONTH(A1),1),DATE(YEAR(A1),MONTH(A1)+1,1))
=IF(AND(DAY(A1)>=1, DAY(A1)<=15),DATE(YEAR(A1),MONTH(A1),1),DATE(YEAR(A1),MONTH(A1)+1,1))
cmarzahn
Posts
35
Registration date
Wednesday February 18, 2015
Status
Member
Last seen
March 13, 2015
7
Feb 18, 2015 at 12:39 PM
Feb 18, 2015 at 12:39 PM
I believe this will do it.
(Where C3 is the target cell)
=IF(DAY(C3)<16,EOMONTH(C3,-1)+1,DATE(YEAR(C3),MONTH(C3)+1,0)+1)
(Where C3 is the target cell)
=IF(DAY(C3)<16,EOMONTH(C3,-1)+1,DATE(YEAR(C3),MONTH(C3)+1,0)+1)
RayH
Posts
122
Registration date
Tuesday August 31, 2010
Status
Contributor
Last seen
June 20, 2016
26
Feb 18, 2015 at 05:47 PM
Feb 18, 2015 at 05:47 PM
Nice. I have never used the EOMONTH function before.
This version is tidier.
=IF(DAY(C3)<16,EOMONTH(C3,-1)+1,EOMONTH(C3,0)+1)
This version is tidier.
=IF(DAY(C3)<16,EOMONTH(C3,-1)+1,EOMONTH(C3,0)+1)
cmarzahn
Posts
35
Registration date
Wednesday February 18, 2015
Status
Member
Last seen
March 13, 2015
7
>
RayH
Posts
122
Registration date
Tuesday August 31, 2010
Status
Contributor
Last seen
June 20, 2016
Feb 20, 2015 at 10:18 AM
Feb 20, 2015 at 10:18 AM
You're right, much tighter.