Lookup question

mhoss24

New Member
Joined
Jul 7, 2008
Messages
6
Using XL 2003

Im trying to determine how many Nos are tied to a certain subject.

Here is the format:

_| Subject | Y/N |
1 SUB1 YES
2 SUB2 YES
3 SUB1 NO
4 SUB1 YES
5 SUB2 NO


I have a dropdown on a different sheet where I can select a subject. I want to be able to determine how many nos pertain to each subject.
Example: When I select SUB1 from my dropdown, I want it to print out "1". Only problem is I have about 50 rows of yes/nos for about 10 different subjects. For a small sample I could use [[given that 'Sheet2'!$A$1 is my dropdown]]

=(IF(AND(A1='Sheet2'!$A$1, B1="NO"),1,0)+(A2='Sheet2'!$A$1, B2="NO"),1,0)+(A3='Sheet2'!$A$1, B3="NO"),1,0)+(A4='Sheet2'!$A$1, B4="NO"),1,0)+(A5='Sheet2'!$A$1, B5="NO"),1,0))



That's a really ugly way out, but the only thing that comes to my head for the moment and it will not work for a large sample like I have. Someone call me an idiot and tell me how to do this.

Please let me know if you need more information. Thanks in advance!!!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Thanks alot! I tried that before but I was selecting the entire A and B column. It spit back a "number error". When I selected only the cells, it works. Weird to me... You are of great help!

Best Regards,
Matthew
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,569
Latest member
Honeymonster123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top