countif

sullyman4

Board Regular
Joined
Nov 8, 2004
Messages
151
:oops:
I have done this before but can't find where i put it.

on sheet 1 I have this summary report.
Code:
           A       B         C
  1   office#  Number Y/N        
  2      2       formula
  3      3       formula
  4      4       formula
  5      5       formula 
  6       6      formula
The formula in cell B2 needs to look at another sheet (that looks like below sheet) and count the number of "Yes" in the office# that matches cell A2 above. So, for office #2 (A1) how many stores in the spreadsheet below have "Yes" The answer displayed in cell B3 should be 3


Second Spreadsheet
Code:
       A          B         C       D
]1   Office#  Strore    Open
2    2          as         yes
3    2          zq          no
4    2          we         yes
5    3          le          no
6    3           re         yes
7    3          bm        no
8    3          hi          yes
9    2          hk         yes
10  6          wp          yes

I hope this is clear If not shoot me an email or just shoot me
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

shades

Well-known Member
Joined
Mar 20, 2002
Messages
1,550
Something like this:

=SUMPRODUCT((Sheet3!$A$2:$A$10=A2)*(Sheet3!$C$2:$C$10="yes"))

This assumes that the other sheet is named Sheet3, and that the data itself begins in A2 on both worksheets.
 

yankee428

Active Member
Joined
Apr 12, 2004
Messages
348
How about placing this in B2, then copy down to B6.

=SUM((officeno=A2)*(yesno="y"))

Use Ctrl+Shift+Enter to enter the formula.

Also, you need to name the second sheet A2:A10 officeno and C2:C10 yesno.
 

Forum statistics

Threads
1,147,508
Messages
5,741,571
Members
423,668
Latest member
Audorin

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
Top