Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default How should I get the # of quarters in a year.

Hi all,
We are paying the health benefit to our employee on a quarterly basis
(calender base). We considered that if an employee joined the company between
1 Jan and 31 Mar we will count it 1 quarter and the same till end of the
year. Our employee is eligible for $1,000/year or $250/quarter. I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should give me 4th
Quarter

or it will be better to calculate the # of quarters between the hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our employees
health benefit to calculate the # of quarters between the employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default How should I get the # of quarters in a year.

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default How should I get the # of quarters in a year.

Consider using this formula! It's not as exact as you required (because it
assumes 91 days for all quarters) but it is fairly simple.
=INT((E2-D2)/91)+1

where E2 join date
D2 pay date

Regards,
Stefi

Ra
€˛Daoud Fakhry€¯ ezt Ć*rta:

Hi all,
We are paying the health benefit to our employee on a quarterly basis
(calender base). We considered that if an employee joined the company between
1 Jan and 31 Mar we will count it 1 quarter and the same till end of the
year. Our employee is eligible for $1,000/year or $250/quarter. I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should give me 4th
Quarter

or it will be better to calculate the # of quarters between the hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our employees
health benefit to calculate the # of quarters between the employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default How should I get the # of quarters in a year.

Dear Arno,
I have received your reply. it is good if you count the # of quarters. But
let's discuss this way.

if an employee's stard date is 15 February (B2) the result should return 4
Quarter, but he formula you have adviced me is howing something like this.

1 sep 05 (B2) = 3 quarter, which I want the contrary for example

if it is between Oct and Dec it should return me 1
if it is between Jul - Sep it should return me 2
if it is between Apr - Jun it should return me 3
if it is between Jan - Mar it should return me 4

sorry for wrong info I wrote in my first message.
if you are online, let's discuss this online by skype (daoudfakhry1985)

Thanks
Daoud

"arno" wrote:

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default How should I get the # of quarters in a year.

Mr./Mrs. Stefi,
thanks for your reply, if I consider E2 as join date (1 sep 05) and D2 as
pay date (31 Dec 05) it returns me (-1). I think the contrary of this formula
will work as following:

=INT((D2-E2)/91)+1

and can't we put 90 instead of 91? and also if we remove the last +1 it
doesn't work, cause I have tried 1 Jan as start date and 31 dec 05 as pay
date then it returned me 5.

Thanks,
Daoud

"Stefi" wrote:

Consider using this formula! It's not as exact as you required (because it
assumes 91 days for all quarters) but it is fairly simple.
=INT((E2-D2)/91)+1

where E2 join date
D2 pay date

Regards,
Stefi

Ra
€˛Daoud Fakhry€¯ ezt Ć*rta:

Hi all,
We are paying the health benefit to our employee on a quarterly basis
(calender base). We considered that if an employee joined the company between
1 Jan and 31 Mar we will count it 1 quarter and the same till end of the
year. Our employee is eligible for $1,000/year or $250/quarter. I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should give me 4th
Quarter

or it will be better to calculate the # of quarters between the hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our employees
health benefit to calculate the # of quarters between the employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default How should I get the # of quarters in a year.

ok, then use

=5-INT((MONTH(B2)-1)/3)+1

I think you should use a "when-to-start-benefit-date" and not the
actual starting date to workaround any rounding problems. eg. from day
1 to 15 you can use the 1st day of the month, if it is between 16-31
then use the first day of the next month. This will workaround problems
like "I started on 12 june and you pay the benefit on 11 december for
the whole year, so why bla bla bla...."

arno

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default How should I get the # of quarters in a year.

Sorry, I mixed up column headings: correctly

where D2 join date
E2 pay date


If you can apply 90 day quarters, then you can use this formula:
=CEILING(DAYS360(D2,E2)/90,1)

(See XL Help on function DAYS360, American vs European usage)

Regards,
Mr. Stefi



€˛Daoud Fakhry€¯ ezt Ć*rta:

Mr./Mrs. Stefi,
thanks for your reply, if I consider E2 as join date (1 sep 05) and D2 as
pay date (31 Dec 05) it returns me (-1). I think the contrary of this formula
will work as following:

=INT((D2-E2)/91)+1

and can't we put 90 instead of 91? and also if we remove the last +1 it
doesn't work, cause I have tried 1 Jan as start date and 31 dec 05 as pay
date then it returned me 5.

Thanks,
Daoud

"Stefi" wrote:

Consider using this formula! It's not as exact as you required (because it
assumes 91 days for all quarters) but it is fairly simple.
=INT((E2-D2)/91)+1

where E2 join date
D2 pay date

Regards,
Stefi

Ra
€˛Daoud Fakhry€¯ ezt Ć*rta:

Hi all,
We are paying the health benefit to our employee on a quarterly basis
(calender base). We considered that if an employee joined the company between
1 Jan and 31 Mar we will count it 1 quarter and the same till end of the
year. Our employee is eligible for $1,000/year or $250/quarter. I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should give me 4th
Quarter

or it will be better to calculate the # of quarters between the hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our employees
health benefit to calculate the # of quarters between the employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default How should I get the # of quarters in a year.

Thanks Mr. Stef,
It works but I should do some dates manually (30 Mar it returns me 3 qtr),
anyway I appreciate your efforts replying me.

Cheers,
Daoud Fakhry

"Stefi" wrote:

Sorry, I mixed up column headings: correctly

where D2 join date
E2 pay date


If you can apply 90 day quarters, then you can use this formula:
=CEILING(DAYS360(D2,E2)/90,1)

(See XL Help on function DAYS360, American vs European usage)

Regards,
Mr. Stefi



€˛Daoud Fakhry€¯ ezt Ć*rta:

Mr./Mrs. Stefi,
thanks for your reply, if I consider E2 as join date (1 sep 05) and D2 as
pay date (31 Dec 05) it returns me (-1). I think the contrary of this formula
will work as following:

=INT((D2-E2)/91)+1

and can't we put 90 instead of 91? and also if we remove the last +1 it
doesn't work, cause I have tried 1 Jan as start date and 31 dec 05 as pay
date then it returned me 5.

Thanks,
Daoud

"Stefi" wrote:

Consider using this formula! It's not as exact as you required (because it
assumes 91 days for all quarters) but it is fairly simple.
=INT((E2-D2)/91)+1

where E2 join date
D2 pay date

Regards,
Stefi

Ra
€˛Daoud Fakhry€¯ ezt Ć*rta:

Hi all,
We are paying the health benefit to our employee on a quarterly basis
(calender base). We considered that if an employee joined the company between
1 Jan and 31 Mar we will count it 1 quarter and the same till end of the
year. Our employee is eligible for $1,000/year or $250/quarter. I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should give me 4th
Quarter

or it will be better to calculate the # of quarters between the hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our employees
health benefit to calculate the # of quarters between the employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default How should I get the # of quarters in a year.

Hi Daoud

I think Arno's second posting gives you the correct answer, if you
modify it by inserting an extra set of brackets.

=5-INT((MONTH(D2)-1)/3)+1

should be
=5-(INT((MONTH(D2)-1)/3)+1)

--
Regards

Roger Govier


"Daoud Fakhry" wrote in message
...
Thanks Mr. Stef,
It works but I should do some dates manually (30 Mar it returns me 3
qtr),
anyway I appreciate your efforts replying me.

Cheers,
Daoud Fakhry

"Stefi" wrote:

Sorry, I mixed up column headings: correctly

where D2 join date
E2 pay date


If you can apply 90 day quarters, then you can use this formula:
=CEILING(DAYS360(D2,E2)/90,1)

(See XL Help on function DAYS360, American vs European usage)

Regards,
Mr. Stefi



"Daoud Fakhry" ezt ķrta:

Mr./Mrs. Stefi,
thanks for your reply, if I consider E2 as join date (1 sep 05) and
D2 as
pay date (31 Dec 05) it returns me (-1). I think the contrary of
this formula
will work as following:

=INT((D2-E2)/91)+1

and can't we put 90 instead of 91? and also if we remove the last
+1 it
doesn't work, cause I have tried 1 Jan as start date and 31 dec 05
as pay
date then it returned me 5.

Thanks,
Daoud

"Stefi" wrote:

Consider using this formula! It's not as exact as you required
(because it
assumes 91 days for all quarters) but it is fairly simple.
=INT((E2-D2)/91)+1

where E2 join date
D2 pay date

Regards,
Stefi

Ra
"Daoud Fakhry" ezt ķrta:

Hi all,
We are paying the health benefit to our employee on a quarterly
basis
(calender base). We considered that if an employee joined the
company between
1 Jan and 31 Mar we will count it 1 quarter and the same till
end of the
year. Our employee is eligible for $1,000/year or $250/quarter.
I want the
following to be calculated in a formula:

if the employee hire date is between 1 Jan to 31 Mar it should
give me 1st
Quarter
if the employee hire date is between 1 Apr to 30 Jun it should
give me 2nd
Quarter
if the employee hire date is between 1 July to 31 Aug it should
give me 3rd
Quarter
if the employee hire date is between 1 Sep to 31 Dec it should
give me 4th
Quarter

or it will be better to calculate the # of quarters between the
hire date
and the benefit payment base date.

Or I am currently in December 2006 and want to calculate our
employees
health benefit to calculate the # of quarters between the
employee hire date
and 31 dec 06?

Thanks for all of your cooperations,
Best,
Daoud Fakhry



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default How should I get the # of quarters in a year.

=5-INT((MONTH(D2)-1)/3)+1
ahhhhhh, sorry

should be
=5-(INT((MONTH(D2)-1)/3)+1)


thanx for correcting :)


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default How should I get the # of quarters in a year.

i am creating a template and only need it to report a quarter if there is a
date in the cell. how can I change this formula to report 0 if there is no
date?

"arno" wrote:

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default How should I get the # of quarters in a year.

=IF(B2="",0,INT((MONTH(B2)-1)/3)+1)

--


Regards,


Peo Sjoblom

"Compben" wrote in message
...
i am creating a template and only need it to report a quarter if there is a
date in the cell. how can I change this formula to report 0 if there is no
date?

"arno" wrote:

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno




  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How should I get the # of quarters in a year.

Try this:

=IF(COUNT(B2),INT((MONTH(B2)+2)/3),0)



--
Biff
Microsoft Excel MVP


"Compben" wrote in message
...
i am creating a template and only need it to report a quarter if there is a
date in the cell. how can I change this formula to report 0 if there is no
date?

"arno" wrote:

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno




  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default How should I get the # of quarters in a year.

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

"Peo Sjoblom" wrote:

=IF(B2="",0,INT((MONTH(B2)-1)/3)+1)

--


Regards,


Peo Sjoblom

"Compben" wrote in message
...
i am creating a template and only need it to report a quarter if there is a
date in the cell. how can I change this formula to report 0 if there is no
date?

"arno" wrote:

Hi,

let's assume you have a date in B2, then the following formula will
give you the quarter based on the month of that date:

=INT((MONTH(B2)-1)/3)+1

arno





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vacation Time calculation... HELP! brubru Excel Discussion (Misc queries) 1 July 22nd 06 10:10 PM
Lookup returns wrong value motorjobs Excel Worksheet Functions 5 June 21st 06 11:49 PM
holiday dates bucci Excel Worksheet Functions 4 June 15th 06 09:35 AM
how do I convert a dates in a year quarters in a year? Linndek Excel Discussion (Misc queries) 2 May 11th 06 03:33 PM
How do I get Excel to automatically calculate salaries actually received in financial year? Kei Excel Discussion (Misc queries) 0 March 3rd 06 10:26 AM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"