@Chris
1) I missed subtracting 1 from the now() to keep stuff correct on the first month of each quarter.
The subtracting 1 from from the NOW month was the issue, but it is to correct for the
last month of each quarter, not the
first.
For example, with your earlier formula, suppose the current month (NOW) was September and the month in A2 was August. They are in the same quarter but for August ..
INT((MONTH($A2)-1)/3)
=INT((8-1)/3)
=2
.. while for September ..
INT(MONTH(NOW())/3)
=INT(9/3)
=3
3) I didn't trap for blanks/non -dates ..
.. this is a correction:
Code:
=NOT(AND((INT((MONTH($A2)-1)/3)=INT((MONTH(NOW())-1)/3)),(YEAR($A2)=YEAR(NOW())),(ISNUMBER($A2))))
This still formats blanks. You have your NOT/AND/ISNUMBER arrangement a bit mixed up.
Peter; Somehow I missed using the Ceiling (and Floor) functions, instead always using int() type nestings. Thanks for pointing it out.
There's nothing wrong with the INT approach, CEILING is just an alternate one.
BTW, not a big issue but NOW() includes the date
and time. Since the time is not relevant in determining the month, the TODAY() function, which just returns the date, would be sufficient.
@Gup
You say the first solution was adequate.
I again point out that although it works while we are still in August, it will fail when the current date turns to September in a week or so.