Count only if immediate right cell is blank...sort of.

kitteyrin

New Member
Joined
Feb 20, 2016
Messages
4
So I have a mess I'm trying to work with. What I'm trying to do is if column G or H has a date in it (isn't blank), count the cell as 1 and return the number. While I don't have an issue with that part, my complication comes in if there's a value (not blank) in column H- that is, it counts it twice. What I need to do is only count it only once even if H has something written in it. However, sometimes only H column is filled, and I still need that column to be counted. Further, I also need it to automatically subtract from the total if column J has the text "Rem'd", "Redefault", or "Disputing" in it.

Here are the various equations I've tried, starting with my original one:

=COUNTA(G2:H2019)-(COUNTIF(J:J,"*REDEFAULT*")+COUNTIF(J:J,"*DISPUTING*")+COUNTIF(J:J,"*REM'D*"))

=COUNTIF(G2:G2012,AND(G2:G2012="<>"&"",H2:H2012=""))

=COUNTIF(G2:G2012,AND(G2:G2012="<>"&"",H2:H2012=""))-(COUNTIF(J:J,"*REDEFAULT*")+COUNTIF(J:J,"*DISPUTING*")+COUNTIF(J:J,"*REM'D*"))

=COUNTA(AND(G2:G2012="<>"&"",H2:H2012=""))-(COUNTIF(J:J,"*REDEFAULT*")+COUNTIF(J:J,"*DISPUTING*")+COUNTIF(J:J,"*REM'D*"))

In order, the above equations return 4, 0, -16, and -15

My data is below, and what I need it to return is 1 for the displayed data, or if all the notes in J is removed, 17.


GHIJ
xFebruary Complete
x
02/04/2016xRem'd
02/05/201602/08/2016Rem'd
02/05/201602/08/2016Rem'd
02/04/2016xRem'd
x
02/16/2016xRem'd
x
02/17/2016xRem'd
02/17/2016xRem'd
02/05/2016xRem'd
02/18/2016xRem'd
02/19/2016xRem'd
x
x
02/24/2016xRem'd
02/24/201602/26/2016
02/23/2016xRem'd
02/24/2016xRem'd
02/18/2016Disputing
02/26/2016xRem'd
x
x
x
02/04/2016Redefault
x
x



Could anyone help me please? I'm willing to provide more information as needed, considering I'm not sure what other information may possibly be required to solve my issue.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
That formula returns a 1 for the table I put in, but if I remove any of the "Rem'd" on line J it doesn't change to 2.
 
Upvote 0
Hi,

Not elegant, but does what you requested:


Excel 2010
GHIJKL
1xFebruary Complete1
2x
32/4/2016xRem'd
42/5/20162/8/2016Rem'd
52/5/20162/8/2016Rem'd
62/4/2016xRem'd
7x
82/16/2016xRem'd
9x
102/17/2016xRem'd
112/17/2016xRem'd
122/5/2016xRem'd
132/18/2016xRem'd
142/19/2016xRem'd
15x
16x
172/24/2016xRem'd
182/24/20162/26/2016
192/23/2016xRem'd
202/24/2016xRem'd
212/18/2016Disputing
222/26/2016xRem'd
23x
24x
25x
262/4/2016Redefault
27x
28x
Sheet1
Cell Formulas
RangeFormula
L1=COUNTIFS(H1:H28,"",G1:G28,"<>"&"")+COUNTIFS(I1:I28,"",H1:H28,"<>"&"")-SUM(COUNTIF(J1:J28,{"Rem'd","Redefault","Disputing"}))
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,591
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