Formula to Count Cells

pwill

Active Member
Joined
Nov 22, 2015
Messages
406
Hi can anyone help with a formula?

On Sheet1 I have headers in cells "A1:D1"

A1 = Ref
B1 = A
C1 = B
D1 = C

On Sheet2 I have Data with headers in 3 separate blocks with 7 columns each:
"B1:H" "J1:P" "R1:X"

"B1:H1" - headers = A
"J1:P1" - headers = B
"R1:X1" - headers = C

On Sheet1 in the Ref Column "A2" different values will be entered. I have entered 0 the example below.

In cell "C2" Sheet1 using the Ref Value in "A1" I want to Count how many times 0 appears on Sheet2 in block B
("J1:P")

And also count at the same time in cells ("B2" & "D2") Sheet1 - how many times 0 appears in
block A ("B1:H") and block C ("R1:X") but only when 0 appears in the same rows as block B ("J1:P")

eg Sheet1
<strike></strike><strike></strike>
ABCDEF
1RefABC
20574
3
4
5

<tbody>
</tbody>

Sheet1 "B2" there are five 0's that appear in Block A on the same rows as Block B and there are four 0's that appear in Block C on the same rows as Block B

eg Sheet2 (I have removed data in the empty rows for easier viewing)
ABCDEFGHIJKLMNOPQRSTUVWXY
1AAAAAAABBBBBBBCCCCCCC
2-270182728350-691423243110-911202128
3
402228383941470-610111319-24
5-20-3893743
6051619303337
7-35-6816193003-811-11142503-8-1114-19-22
8
910121422263806-6816203212010-121426
100-7-10-11-182022
1113-383640010-47353940
1204-12-1416-23-26
13052729343539
1410712-13-26-29
15
16157-7293032230-828293123-3-1125028
17
18371002227451-4017182341
1902132343940461214027323339-10112223293036
20-15613152223
21

<tbody>
</tbody>

Any help would be appreciated

Regards

pwill
 
Last edited:

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

pwill

Active Member
Joined
Nov 22, 2015
Messages
406
sorry typo error

In cell "C2" Sheet1 using the Ref Value in
"A1" should be "A2"

Regards

 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,132,664
Messages
5,654,633
Members
418,145
Latest member
Waqar804

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