Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Count cells that contain "Y" in columnA IF contains"X" in columnB

Excel 2003- I'm trying to compose a function that will return a numeric value
of cells that contain a given value in one column, but only if they also
contain a given value in another coulumn. For example, I want to know how
many candidates for a job have accepted their offer (contain "Y" in "Offer
Accepted?" column) for each manager's area (contain "John Smith" in "Region
of Placement" column). The spreadsheet which contains the data I want to
count lists all candidates that have been offered positions, for all regions,
sorted by Candidate's last name. I want the Summary worksheet (which will
contain the formula) to tell me how many accepted for each individual region.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Count cells that contain "Y" in columnA IF contains"X" in columnB

For example:

Manager Offer
Candidate Region Accepted?
Doe, Jane J White Y
Smith, Jon B Davis Y
Johnson, Jack J White N

I want to count the # of "Y" in column "Offer Accepted", IF column "Manager
Region" contains "J White".

"holliedavis" wrote:

Excel 2003- I'm trying to compose a function that will return a numeric value
of cells that contain a given value in one column, but only if they also
contain a given value in another coulumn. For example, I want to know how
many candidates for a job have accepted their offer (contain "Y" in "Offer
Accepted?" column) for each manager's area (contain "John Smith" in "Region
of Placement" column). The spreadsheet which contains the data I want to
count lists all candidates that have been offered positions, for all regions,
sorted by Candidate's last name. I want the Summary worksheet (which will
contain the formula) to tell me how many accepted for each individual region.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count cells that contain "Y" in columnA IF contains"X" in columnB


If Offer Accepted is column A and region column B then,

=SUMPRODUCT((A1:A100="Y")*(B1:B100="John Smith"))

Note: SUMPRODUCT requires that the ranges be the same size.


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=563354

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Count cells that contain "Y" in columnA IF contains"X" in colu

I need this formula on sheet "Summary". The info is being pulled from sheet
"Offers" within the same workbook. The "Offers Accepted is column Y, and the
Region is column H.

I entered the formulas as follows:
=SUMPRODUCT((Offers!H:H="J White")*(Offers!Y:Y="Y"))

I received a #NUM! error... Help?


"SteveG" wrote:


If Offer Accepted is column A and region column B then,

=SUMPRODUCT((A1:A100="Y")*(B1:B100="John Smith"))

Note: SUMPRODUCT requires that the ranges be the same size.


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=563354


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count cells that contain "Y" in columnA IF contains"X" in columnB


Hollie,

SUMPRODUCT does not allow you to use an entire column or row (A:A) as a
range. Just change to something like,

=SUMPRODUCT((Offers!H1:H65000="J White")*(Offers!Y1:Y65000="Y"))

Should have warned you of that.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=563354



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 108
Default Count cells that contain "Y" in columnA IF contains"X" in colu


holliedavis wrote:
I need this formula on sheet "Summary". The info is being pulled from sheet
"Offers" within the same workbook. The "Offers Accepted is column Y, and the
Region is column H.

I entered the formulas as follows:
=SUMPRODUCT((Offers!H:H="J White")*(Offers!Y:Y="Y"))

I received a #NUM! error... Help?


Hi holliedavis

SUMPRODUCT doesn't work with whole column references; specify the range
you want.

Regards

Steve

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Count cells that contain "Y" in columnA IF contains"X" in colu

SUMPRODUCT has to have arrays defined e.g H1:H2000 as it cannot use total
columns as per your formula.

=SUMPRODUCT(--(Offers!H1:H5000="J White"),--(Offers!Y1:Y5000="Y"))

-- converts TRUE/FALSE to numeric 1/0


HTH

"holliedavis" wrote:

I need this formula on sheet "Summary". The info is being pulled from sheet
"Offers" within the same workbook. The "Offers Accepted is column Y, and the
Region is column H.




I entered the formulas as follows:
=SUMPRODUCT((Offers!H:H="J White")*(Offers!Y:Y="Y"))

I received a #NUM! error... Help?


"SteveG" wrote:


If Offer Accepted is column A and region column B then,

=SUMPRODUCT((A1:A100="Y")*(B1:B100="John Smith"))

Note: SUMPRODUCT requires that the ranges be the same size.


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=563354


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
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 0 May 15th 05 08:14 PM
COUNT NON-BLANK CELLS WITH REFERENCE TO ANOTHER COLUMN carricka Excel Worksheet Functions 1 May 6th 05 04:50 PM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM
Count non-colored cells Ken G Excel Discussion (Misc queries) 3 January 2nd 05 12:42 PM
Count number of shaded cells Maddoktor Excel Discussion (Misc queries) 2 December 20th 04 08:35 PM


All times are GMT +1. The time now is 09:28 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"