View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Compben Compben is offline
external usenet poster
 
Posts: 6
Default Calculate a quarter

excellent, thank you I have been working on this for days

"Roger Govier" wrote:

Hi

If you do want to show a 0 then use
=IF(A1="",0,ROUNDUP(MONTH(A1)/3,0) & "Q" & RIGHT(YEAR(A1),2))
or if you want the cell to remain blank, then
=IF(A1="","",ROUNDUP(MONTH(A1)/3,0) & "Q" & RIGHT(YEAR(A1),2))

The reason it is returning Q1, is that empty date cells are taken to be
00/01/1900, hence they fall into Month 1


--
Regards
Roger Govier

"Compben" wrote in message
...
if cell A1 is empty I want it to report a 0 how can i do this. thanks in
advance. I am ccreating a template that calculate quarters but find that
the
template without dates is hshowing that it is the 1st quarter.

"Gary''s Student" wrote:

With a date in A1:

=ROUNDUP(MONTH(A1)/3,0) & "Q" & RIGHT(YEAR(A1),2)


--
Gary''s Student - gsnu200786