Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Caribbean
Posts: 6
Default Count if "yes or no" in one range if there is a unique number in another

Help!!!

I am trying to create a formula on one tab that will count the number of times "yes" or "no" appears in one column based on if a different project number is another column.

Formula will only count if the value in column 'a' is a unique number. For example, it will see that A1 and A2 have the same value, so it will look at b2 and b3 only one time and count it as 1.

See below for example:

Tab "Data Sheet"

A B
1 08421 No
2 08421 No
3 06542 Yes
4 06543 Yes


Tab "Chart Data"

Yes 2
No 1

Last edited by Lorax : April 5th 11 at 04:15 PM
  #2   Report Post  
Senior Member
 
Location: Philippines
Posts: 161
Default

Quote:
Originally Posted by Lorax View Post
Help!!!

I am trying to create a formula on one tab that will count the number of times "yes" or "no" appears in one column based on if a different project number is another column.

Formula will only count if the value in column 'a' is a unique number. For example, it will see that A1 and A2 have the same value, so it will look at b2 and b3 only one time and count it as 1.

See below for example:

Tab "Data Sheet"

A B
1 08421 No
2 08421 No
3 06542 Yes
4 06543 Yes


Tab "Chart Data"

Yes 2
No 1
For each cell in column B, the formula should contain:
=IF(COUNTIF($A:$A,A1)=2,"No","Yes")
__________________
Asobi Wa Owari Da
  #3   Report Post  
Junior Member
 
Location: Caribbean
Posts: 6
Default

Quote:
Originally Posted by wickedchew View Post
For each cell in column B, the formula should contain:
=IF(COUNTIF($A:$A,A1)=2,"No","Yes")
Alas, it did not perform as needed. I believe I might need to explain more in detail.

The formula I need will have to scan through column 'A' and find only unique work order numbers, it will skip duplicates. Once it has found a unique number in column 'A', it will then look at column 'B' for a yes or a no. It will then count the number of times yes or no appears in column 'B'. If a number is repeated in column 'A', it will disregard the duplicates and count one time from column 'B'
Column'A' Column 'B
W.O. # Complete Pkg
90458179 Yes
90458179 Yes
80053785 Yes
80053785 Yes
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90457063 No
90458387 Yes
90455286 No
90455138 Yes

The formula will only look at number, 90457063, once and count one 'No' in column 'B'. It will only count the number of Yes or No's one time regardless of the number of times the number appears in column 'A'

The totals shoudl read: Yes = 6 and No = 2

Hope this helps to clarify what I am needing. I am also stuck using Excel 2003..
  #4   Report Post  
Senior Member
 
Location: Belo Horizonte, Brazil
Posts: 170
Thumbs up

Dear Lorax, Good afternoon.

I did an example to you.
It uses an auxiliar column.

It was developed using Excel 2003.
It´s he http://www.4shared.com/document/sspz..._Lorax_V1.html
__________________
I hope it can help you.

Best regards,
Marcilio Lobão
---------------------------
Belo Horizonte, Brazil
  #5   Report Post  
Member
 
Posts: 31
Default

Quote:
Originally Posted by Lorax View Post
Alas, it did not perform as needed. I believe I might need to explain more in detail.

The formula I need will have to scan through column 'A' and find only unique work order numbers, it will skip duplicates. Once it has found a unique number in column 'A', it will then look at column 'B' for a yes or a no. It will then count the number of times yes or no appears in column 'B'. If a number is repeated in column 'A', it will disregard the duplicates and count one time from column 'B'
I have answered a similar post elsewhere where the request was for a formula to display whether a value was Unique or Already Used. Below is this formula, then taking it one step further, the formula required to count the number of times a Yes appears next to a Unique WO Number.

Assuming column A contains your Work Order Numbers, and column B contains the Yes/No values, in column C, next to the first WO Number, paste in the following formula, then copy and paste it down next to every instance of a WO Number:
Code:
=IF(ISERROR(VLOOKUP($A2,$A$1:$A1,1,FALSE)),"Unique","Already Used")
Now, in a cell where you want the result of how many Yes values appear next to a Unique Work Order Number, paste in the formula:
Code:
=SUM(IF(B:B="Yes",IF(C:C="Unique",1,0),0))
Finally, on that cell where you just pasted the SUM formula above, click to put the cursor in the formular bar as if you were editing the formula, then press CTRL+SHIFT+ENTER. This will put curly braces {} around the formula so that it looks like this:
Code:
{=SUM(IF(B:B="Yes",IF(C:C="Unique",1,0),0))}
For the sample data you gave above, this gave me the result of 4.

Last edited by tarquinious : May 3rd 11 at 03:39 PM Reason: forgot something...
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
Can "countifs" be utilized to return a count of unique values? ascottbag-hcm Excel Worksheet Functions 1 October 27th 09 06:22 PM
Count letter"B" in one column based on unique value among duplicat Mero Excel Worksheet Functions 4 May 21st 09 12:26 PM
Count the number of cells that conatin a "." in a range Jonathan Brown Excel Worksheet Functions 5 February 5th 09 11:00 PM
Formula to count number of time stamps within a range in a column having dates formatted as "custom" Sam Excel Discussion (Misc queries) 3 June 19th 07 12:33 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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