Count one column by the result of another column?

mv8167

Board Regular
Joined
Apr 27, 2005
Messages
103
I am trying to count a column. My goal is for each Manual test found, I want to check to see if a date is present in another column. If a date is found, then add 1 to a counter. Same thing, I would like to check for each Manual test if a Pas or Fail was issued.

I am trying to refference a column looking for the word Manual. If the function finds the word Manual, I want it to look in another column (same row) to find the date. If there is a date, then add 1 to conut. If space is blank/empty, continue to next Manual row.

I have been trying a few solutions witrh no luck:

=IF(COUNTIF(B3:B152,"=*manual*"),COUNTIF(C3:C152,("")))

=IF(COUNTIF(B3:B152,"=*manual*"),COUNTA(C3:C152,("")))

=IF(COUNTIF(B3:B152,"=*manual*"),SUMIF(COUNTA(C3:C152,("")))

ETC...

Is it even possible to ?
 

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 this instead

=SUMPRODUCT(ISNUMBER(SEARCH("manual",B3:B152))*(C3:C152<>""))
 
Upvote 0
mv8167 said:
I am trying to count a column. My goal is for each Manual test found, I want to check to see if a date is present in another column. If a date is found, then add 1 to a counter. Same thing, I would like to check for each Manual test if a Pas or Fail was issued.

I am trying to refference a column looking for the word Manual. If the function finds the word Manual, I want it to look in another column (same row) to find the date. If there is a date, then add 1 to conut. If space is blank/empty, continue to next Manual row.

I have been trying a few solutions witrh no luck:

=IF(COUNTIF(B3:B152,"=*manual*"),COUNTIF(C3:C152,("")))

=IF(COUNTIF(B3:B152,"=*manual*"),COUNTA(C3:C152,("")))

=IF(COUNTIF(B3:B152,"=*manual*"),SUMIF(COUNTA(C3:C152,("")))

ETC...

Is it even possible to ?

=SUMPRODUCT(--ISNUMBER(SEARCH("manual",B3:B152)),--ISNUMBER(C3:C152))
 
Upvote 0
Thanks

I tried your suggestion, but the function returned 0. I should have 500.

What is "fix" for?
 
Upvote 0
I had edited that long ago.

I forgot to adjust that after I did my testing of the formula:

Use:
=SUMPRODUCT(ISNUMBER(SEARCH("manual",B3:B152))*(C3:C152<>""))
 
Upvote 0
Thanks! I dont know why I did not see that myself. I also changed C3:C152<>"" to D3:D152="*Fail*") to look for failed manual tests.

Thanks again
 
Upvote 0
You'll want the formula to be this then:

=SUMPRODUCT(--(ISNUMBER(SEARCH("Manual",B3:B152))),--(ISNUMBER(SEARCH("Fail",D3:D152))))
 
Upvote 0
If *fail* is a wildcard, then you should rewrite the formula as:

=SUMPRODUCT((ISNUMBER(SEARCH("manual",B3:B152)))*(ISNUMBER(SEARCH("fail",D3:D152))))
 
Upvote 0
Thanks to you both.

Both seem to work fine. What makes your function better then the first? I guess the first function won't pickup failed. I would think it would.

Thanks twice

Mike
 
Upvote 0
Excel's "wildcard" is the Search or Find function, where you tell it the string to search for and within what cell, the * wildcard shouldn't work e.g. Search("fail",A1) or Find("fail",A1), the difference is case sensitivity only.

Did you test it to make sure, your way is actually counting when both manual and fail are in strings side by side?
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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