Complicated Counting problem

jdg347

New Member
Joined
Jun 19, 2009
Messages
19
Hi, I want to be able to first check and see which cells within column E contain the string 00-EI. Once I have determined this I would like to look at columns C & D and then count the number of corresponding pairs (ie. c3 & d3) that are non blank AND also correspond to the 00-EI in column E.

I can count the non blanks, and can determine which cells in column E contain 00-EI but when I try to combine them I cannot get the correct syntax. Here is the syntax I am trying:

=IF(qryCableRoutingSchedule!E:E="00-VI",SUMPRODUCT(--(qryCableRoutingSchedule!C2:C351 <> ""),--(qryCableRoutingSchedule!D2:D351 <> "")),0)

Here is an example of what I have

row#1 C_________D__________E
row#2 2------------6----------00-EI
row#3 1-----------___---------00-EI
row#4 3 -----------3----------00-FF
row#5 55-----------44---------00-EI

So in this case I would like the count to be 2( Row#2 and row#5) since they both correspond to 00-EI(column E) and both have values in Columns C and D.

Thanks for your help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try

=SUMPRODUCT(--(qryCableRoutingSchedule!E2:E351="00-VI"),--(qryCableRoutingSchedule!C2:C351 <> ""),--(qryCableRoutingSchedule!D2:D351 <> ""))
 
Upvote 0
What if I wanted to instead of defining "00-EI", just reference the cell? How could I do that?
 
Upvote 0
Try this with the text string 00-E1 in cell A1

=SUMPRODUCT(--(qryCableRoutingSchedule!E2:E351=A1),--(qryCableRoutingSchedule!C2:C351 <> ""),--(qryCableRoutingSchedule!D2:D351 <> ""))
 
Upvote 0
Thanks again, got it!

One more problem though, I have everything I want working except now in my countif (same type of scenario) I want to implement the =A1 insteat of typing "=00-EI". Is this possible with countif?

Here is the syntax I am using.

COUNTIF(qryCableRoutingSchedule!$E$1:$E$1000,"=00-EI")

*This is part of a larger formula, not sure if you want to see the whole thing but here it is(Cell D17 = 00-VI):

=(SUMPRODUCT(--(qryCableRoutingSchedule!$E$2:$E$351=D17),--(qryCableRoutingSchedule!$C$2:$C$351 <> ""),--(qryCableRoutingSchedule!$D$2:$D$351 <> "")))/(COUNTIF(qryCableRoutingSchedule!$E$1:$E$1000,"=00-VI"))
 
Upvote 0

Forum statistics

Threads
1,223,719
Messages
6,174,087
Members
452,542
Latest member
Bricklin

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