ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   CF for next month/this year (https://www.excelbanter.com/excel-discussion-misc-queries/202263-cf-next-month-year.html)

computexcel

CF for next month/this year
 
I recently got this formula from Dave, thanks :
=text(A1,"yyyymm")=text(today(),"yyyymm")
to use it in conditional formatting and color RED all dates for this month.
Now I need the "contraparte" for another worsheet :
CF to color GREEN all dates for next month, today is October, next month will
be November, Etc. Autoupdating like the above formula does.
THANKS in advance.

smartin

CF for next month/this year
 
computexcel wrote:
I recently got this formula from Dave, thanks :
=text(A1,"yyyymm")=text(today(),"yyyymm")
to use it in conditional formatting and color RED all dates for this month.
Now I need the "contraparte" for another worsheet :
CF to color GREEN all dates for next month, today is October, next month will
be November, Etc. Autoupdating like the above formula does.
THANKS in advance.



=DATE(YEAR(A3),MONTH(A3),1)=DATE(YEAR(TODAY()),MON TH(TODAY())+1,1)
^^

Works across year-ends as well.

Adjust the bit above ^^ to make this relative to any number of months.

David Biddulph[_2_]

CF for next month/this year
 
Change today() to DATE(YEAR(Today()),MONTH(Today())+1,1)
--
David Biddulph

"computexcel" wrote in message
...
I recently got this formula from Dave, thanks :
=text(A1,"yyyymm")=text(today(),"yyyymm")
to use it in conditional formatting and color RED all dates for this
month.
Now I need the "contraparte" for another worsheet :
CF to color GREEN all dates for next month, today is October, next month
will
be November, Etc. Autoupdating like the above formula does.
THANKS in advance.




Max

CF for next month/this year
 
.. CF to color GREEN all dates for next month ..

Think you could try:
=TEXT(A1,"yyyymm")=TEXT(DATE(YEAR(TODAY()),MONTH(T ODAY())+1,1),"yyyymm")
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,800 Files:359 Subscribers:56
xdemechanik
---


computexcel

CF for next month/this year
 
Like my cat says "Purrrfect".All three formulas.
Thanks smartin, David and Max
you are very kind.

"Max" wrote:

.. CF to color GREEN all dates for next month ..


Think you could try:
=TEXT(A1,"yyyymm")=TEXT(DATE(YEAR(TODAY()),MONTH(T ODAY())+1,1),"yyyymm")
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,800 Files:359 Subscribers:56
xdemechanik
---


smartin

CF for next month/this year
 
computexcel wrote:
Like my cat says "Purrrfect".All three formulas.
Thanks smartin, David and Max
you are very kind.


Glad you found an answer.

My cat says "mwraowwwwr?", but he's a little touched.

Max

CF for next month/this year
 
Welcome, thanks for feeding back.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,800, Files:359, Subscribers:56
xdemechanik
---
"computexcel" wrote in message
...
Like my cat says "Purrrfect".All three formulas.
Thanks smartin, David and Max
you are very kind.





All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com