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
- Fenix internet on bank statement - Guide
- Application for bank statement sbi - Guide
- Excel if statement - Guide
- An if statement nested within another if statement will produce how many possible results? - Guide
- Vba case statement with string - Guide
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.