Forum Discussion
nvega
Jul 24, 2019Copper Contributor
Test if day of month falls between two dates
I've been trying to relay a month-month formula in Excel 2013. Where if a Date value is inputted in a cell, another cell (with formula) would display "1st date of month-last date of month" i.e. - if ...
- Jul 24, 2019
Hi
You can use one of 2 functions (EOMONTH or DATE) in combination with a TEXT function to set the formatting you want. Since the EOMONTH has been already provided, then here is the other oneYou can use the formula
=TEXT(DATE(YEAR(A1),MONTH(A1),1),"mm/dd/yy")&
" - "&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"mm/dd/YY")
Hope that helps
Nabil Mourad
nabilmourad
Jul 24, 2019MVP
Hi
You can use one of 2 functions (EOMONTH or DATE) in combination with a TEXT function to set the formatting you want. Since the EOMONTH has been already provided, then here is the other one
You can use the formula
=TEXT(DATE(YEAR(A1),MONTH(A1),1),"mm/dd/yy")&
" - "&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"mm/dd/YY")
Hope that helps
Nabil Mourad
- nvegaJul 25, 2019Copper Contributor
worked! thanks a million nabilmourad
- nabilmouradJul 25, 2019MVP