Count of days in a quarter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is there any formula to count the number of days in the quarter.

e.g if I have a date Feb6, 2007 in one cell, I want to populate
corresponding cell with number of days in Q1 2007 (90 days).

Please help me in this.

Thanks,
Mahesh
 
One way

=CHOOSE(INDEX({1;2;3;4},INT((MONTH(A1)+2)/3)),IF(DAY(DATE(YEAR(A1),2,29))=29,91,90),91,92,92)

will take care of leap years as well

if only for 2007


=CHOOSE(INDEX({1;2;3;4},INT((MONTH(A1)+2)/3)),90,91,92,92)
 
No need for the call to INDEX.

=CHOOSE(INT((MONTH(A1)+2)/3),90+(DAY(DATE(YEAR(A1),2,29))=29),91,92,92)
 
Yes and no, if you are going to be able to adapt it to financial quarters
yes, but if you are using simple calendar quarters like what the OP asked
for then you are right that there is no need for the index.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top