Count based on one column being blank and one being not blank

bchez

Board Regular
Joined
May 19, 2014
Messages
55
I can't find this or figure it out, and it should be simple. I'm embarrassed to ask. I have a spreadsheet where we receive a request and fill in a date when we receive the request. See column A below. When we complete the request, we log the date in Column B. I need the count of all incomplete requests, based on their being a date in column A but no corresponding date in Column B. How do I do this? The answer in my example should be 2. The formula would go in B2 - letters and numbers below simulate row and col headings. Thank you in advance if you know this.

A
B
C
1
Date received
Date completed
Customer name
2
6/14/17
Jones
3
6/14/17
6/21/17
Smith
4
6/14/17
6/18/17
Thomas
5
6/15/17
Mills

<tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Thank you, but that doesn't take into account column A. If A2 is not blank but B2 is blank, I want it to count B2. If A3 is not blank but B3 is blank, I want it to count B3 etc. Make sense? Thank you again!
 
Upvote 0
=SUMPRODUCT(COUNTA(A1:A10)-COUNTA(B1:B10))

will return the number of rows in A1:B10 where column A has a value and column B does not.

(The formula assumes that it is never the case that A is blank and B is filled)

I just realized that, with that assumption, the SUMPRODUCT is not needed

=COUNTA(A1:A10)-COUNTA(B1:B10))
 
Last edited:
Upvote 0
=SUMPRODUCT(COUNTA(A1:A10)-COUNTA(B1:B10))

will return the number of rows in A1:B10 where column A has a value and column B does not.

(The formula assumes that it is never the case that A is blank and B is filled)

I just realized that, with that assumption, the SUMPRODUCT is not needed

=COUNTA(A1:A10)-COUNTA(B1:B10))

Thank you Mike. This works nicely. I modified it slightly to read =COUNTA($A:$A)-COUNTA($B:$B) and it seems to work. Nicely done. I would not have thought of COUNTA
Also your assumption in quotes above is entirely true as well. Very nice of you to assist in this matter.
 
Upvote 0
Thanks Eric - this formula, like Mike's above, also works very well. Very much appreciated. At first my boss wanted me to find how many were incomplete by date, for example, how many are incomplete on June 3, 2017. I believe this is impossible without VBA. I am much obliged for your considerate and effective help. Thank you
 
Upvote 0
Actually, it's pretty easy to count the incomplete ones by date:


Book1
ABCDE
1Date ReceivedDate CompletedCustomer Name
21/1/20171/2/2017Amy2
32/1/2017Bob1
43/1/20173/2/2017Cathy14/1/2017
54/1/20174/2/2017Doug
64/1/2017Eva
74/1/20174/4/2017Frank
Sheet7
Cell Formulas
RangeFormula
D2=COUNTIFS(A:A,"<>",B:B,"")
D3=COUNTIFS(A:A,DATE(2017,4,1),B:B,"")
D4=COUNTIFS(A:A,E4,B:B,"")



The D2 formula is my original from post #5, which shows a count of 2 (row 3 and row 6). D3 shows how to put a date in it, and D4 shows how to put the date in another cell. These both just count row 6.

Glad we could help.
 
Last edited:
Upvote 0
Actually, it's pretty easy to count the incomplete ones by date:

ABCDE
1Date ReceivedDate CompletedCustomer Name
21/1/20171/2/2017Amy2
32/1/2017Bob1
43/1/20173/2/2017Cathy14/1/2017
54/1/20174/2/2017Doug
64/1/2017Eva
74/1/20174/4/2017Frank

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
D2=COUNTIFS(A:A,"<>",B:B,"")
D3=COUNTIFS(A:A,DATE(2017,4,1),B:B,"")
D4=COUNTIFS(A:A,E4,B:B,"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>




The D2 formula is my original from post #5, which shows a count of 2 (row 3 and row 6). D3 shows how to put a date in it, and D4 shows how to put the date in another cell. These both just count row 6.

Glad we could help.

Thank you. I will try these out next work shift. Cheers to you!
 
Upvote 0
sorry about that this one will work =SUMPRODUCT((A2:A5<>"")*(B2:B5=""))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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