Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Replacing COUNTIFS with COUNTIF

Hi,
I prepared a report in Excel 2007 that uses the Yearfrac and countifs
functions to generate values. Unfortunately, my target audience has Excel
2003 so they get the Name# error in all the fields with the YearFrac/Countifs
formulae. Is there any way I can re-work the formula to get the same results?
Here is the sample data on one worksheet (PSG) and the formula I am using:
A B C D
E
Emp Code Name Designation Joining Date Tenure (years)
311 Mark Jacob Sr. QAP 5/17/2004 3.55
100 Joshua Smith QAP 3/15/2005 2.73
144 Rahul D QAP 3/1/2006 1.76
434 Bradshaw, G QA Lead 10/5/2006 1.17
237 John Joseph BA 12/4/2003 4.01

to get the value of the tenure in column E, i was using:
=YEARFRAC(D3,TODAY(),3)
On the second worksheet ('Summary'), to find the number of employees with
designation QA and tenure 2 years, I was using:
=COUNTIFS(PSG!C2:C100,"=QAP",PSG!E2:E100,"=2")+CO UNTIFS(PSG!C2:C100,"=QA
Lead",PSG!E2:E100,"=2")+COUNTIFS(PSG!C2:C100,"=Sr . QAP",PSG!E2:E100,"=2")

Similarly, for designation QA and tenure between 1 and 2 years:
=(COUNTIFS(PSG!C3:C100,"=QAP",PSG!E3:E100,"=1",PS G!E3:E100,"<2"))+(COUNTIFS(PSG!C3:C100,"=Sr.
QAP",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))+(COUNTIF S(PSG!C3:C100,"=QA
Lead",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))

Please let me know if I can use some other functions (instead of YEARFRAC
and COUNTIFS) to get the same results.

Thanks,
Ashish
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Replacing COUNTIFS with COUNTIF

Use SUMPRODUCT:

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=2))

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=1),--(PSG!E2:E100<2))

--
Biff
Microsoft Excel MVP


"Ashish G" wrote in message
...
Hi,
I prepared a report in Excel 2007 that uses the Yearfrac and countifs
functions to generate values. Unfortunately, my target audience has Excel
2003 so they get the Name# error in all the fields with the
YearFrac/Countifs
formulae. Is there any way I can re-work the formula to get the same
results?
Here is the sample data on one worksheet (PSG) and the formula I am using:
A B C D
E
Emp Code Name Designation Joining Date Tenure (years)
311 Mark Jacob Sr. QAP 5/17/2004 3.55
100 Joshua Smith QAP 3/15/2005 2.73
144 Rahul D QAP 3/1/2006 1.76
434 Bradshaw, G QA Lead 10/5/2006 1.17
237 John Joseph BA 12/4/2003 4.01

to get the value of the tenure in column E, i was using:
=YEARFRAC(D3,TODAY(),3)
On the second worksheet ('Summary'), to find the number of employees with
designation QA and tenure 2 years, I was using:
=COUNTIFS(PSG!C2:C100,"=QAP",PSG!E2:E100,"=2")+CO UNTIFS(PSG!C2:C100,"=QA
Lead",PSG!E2:E100,"=2")+COUNTIFS(PSG!C2:C100,"=Sr .
QAP",PSG!E2:E100,"=2")

Similarly, for designation QA and tenure between 1 and 2 years:
=(COUNTIFS(PSG!C3:C100,"=QAP",PSG!E3:E100,"=1",PS G!E3:E100,"<2"))+(COUNTIFS(PSG!C3:C100,"=Sr.
QAP",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))+(COUNTIF S(PSG!C3:C100,"=QA
Lead",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))

Please let me know if I can use some other functions (instead of YEARFRAC
and COUNTIFS) to get the same results.

Thanks,
Ashish



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Replacing COUNTIFS with COUNTIF

That worked really well.
Thank you so much!

"T. Valko" wrote:

Use SUMPRODUCT:

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=2))

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=1),--(PSG!E2:E100<2))

--
Biff
Microsoft Excel MVP


"Ashish G" wrote in message
...
Hi,
I prepared a report in Excel 2007 that uses the Yearfrac and countifs
functions to generate values. Unfortunately, my target audience has Excel
2003 so they get the Name# error in all the fields with the
YearFrac/Countifs
formulae. Is there any way I can re-work the formula to get the same
results?
Here is the sample data on one worksheet (PSG) and the formula I am using:
A B C D
E
Emp Code Name Designation Joining Date Tenure (years)
311 Mark Jacob Sr. QAP 5/17/2004 3.55
100 Joshua Smith QAP 3/15/2005 2.73
144 Rahul D QAP 3/1/2006 1.76
434 Bradshaw, G QA Lead 10/5/2006 1.17
237 John Joseph BA 12/4/2003 4.01

to get the value of the tenure in column E, i was using:
=YEARFRAC(D3,TODAY(),3)
On the second worksheet ('Summary'), to find the number of employees with
designation QA and tenure 2 years, I was using:
=COUNTIFS(PSG!C2:C100,"=QAP",PSG!E2:E100,"=2")+CO UNTIFS(PSG!C2:C100,"=QA
Lead",PSG!E2:E100,"=2")+COUNTIFS(PSG!C2:C100,"=Sr .
QAP",PSG!E2:E100,"=2")

Similarly, for designation QA and tenure between 1 and 2 years:
=(COUNTIFS(PSG!C3:C100,"=QAP",PSG!E3:E100,"=1",PS G!E3:E100,"<2"))+(COUNTIFS(PSG!C3:C100,"=Sr.
QAP",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))+(COUNTIF S(PSG!C3:C100,"=QA
Lead",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))

Please let me know if I can use some other functions (instead of YEARFRAC
and COUNTIFS) to get the same results.

Thanks,
Ashish




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Replacing COUNTIFS with COUNTIF

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Ashish G" wrote in message
...
That worked really well.
Thank you so much!

"T. Valko" wrote:

Use SUMPRODUCT:

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=2))

=SUMPRODUCT(--(ISNUMBER(MATCH(PSG!C2:C100,{"QAP","QA Lead","Sr.
QAP"},0))),--(PSG!E2:E100=1),--(PSG!E2:E100<2))

--
Biff
Microsoft Excel MVP


"Ashish G" wrote in message
...
Hi,
I prepared a report in Excel 2007 that uses the Yearfrac and countifs
functions to generate values. Unfortunately, my target audience has
Excel
2003 so they get the Name# error in all the fields with the
YearFrac/Countifs
formulae. Is there any way I can re-work the formula to get the same
results?
Here is the sample data on one worksheet (PSG) and the formula I am
using:
A B C D
E
Emp Code Name Designation Joining Date Tenure (years)
311 Mark Jacob Sr. QAP 5/17/2004 3.55
100 Joshua Smith QAP 3/15/2005 2.73
144 Rahul D QAP 3/1/2006 1.76
434 Bradshaw, G QA Lead 10/5/2006 1.17
237 John Joseph BA 12/4/2003 4.01

to get the value of the tenure in column E, i was using:
=YEARFRAC(D3,TODAY(),3)
On the second worksheet ('Summary'), to find the number of employees
with
designation QA and tenure 2 years, I was using:
=COUNTIFS(PSG!C2:C100,"=QAP",PSG!E2:E100,"=2")+CO UNTIFS(PSG!C2:C100,"=QA
Lead",PSG!E2:E100,"=2")+COUNTIFS(PSG!C2:C100,"=Sr .
QAP",PSG!E2:E100,"=2")

Similarly, for designation QA and tenure between 1 and 2 years:
=(COUNTIFS(PSG!C3:C100,"=QAP",PSG!E3:E100,"=1",PS G!E3:E100,"<2"))+(COUNTIFS(PSG!C3:C100,"=Sr.
QAP",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))+(COUNTIF S(PSG!C3:C100,"=QA
Lead",PSG!E3:E100,"=1",PSG!E3:E100,"<2"))

Please let me know if I can use some other functions (instead of
YEARFRAC
and COUNTIFS) to get the same results.

Thanks,
Ashish






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
countifs Forza MIlan Excel Discussion (Misc queries) 2 July 4th 07 09:48 AM
Averageifs & Countifs Stephanie Excel Worksheet Functions 3 June 13th 07 12:15 PM
Counting (Countifs) in excel2003 Samutprakarn Excel Worksheet Functions 7 April 24th 07 08:21 AM
2 COUNTIFS Joey041 Excel Discussion (Misc queries) 1 November 16th 06 08:11 AM
Multiple countifs ozcank Excel Worksheet Functions 2 November 14th 05 10:36 AM


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

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

About Us

"It's about Microsoft Excel"