Is Not Empty With Formula

Front

Board Regular
Joined
Oct 26, 2021
Messages
54
Office Version
  1. 2016
Platform
  1. Windows
I have been working on this formula for hours. I figured out the issue, but I cannot figure out how to solve it. I want my formula to count only if two criteria's are met. However, the second criteria is looking at a cell that appears empty, but there is a formula in it and because there is a formula in it, my other formula thinks there is a value in it. How do I make it so there is no value when the cell only has a formula in it and then count only when that formula has executed.

Here is what I have:

=COUNTIFS(Table134[Reason For Opening],"*"&$AC$10&"*",Table134[Final Profit],"<>"&"")

Because of "<>"&"" counts the formula it always returns all occurrences. How do I tell it to count, but ignore the formula. I hope that makes sense.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi Front,

I'm not sure I understand without an example (e.g. I don't know what "count only when that formula has executed" means).

You could add a worker column to indicate which rows contain a formula and which not, or you could use a different approach such as SUMPRODUCT. Here it only counts if X is in the column as data entered but ignore any X as the result of a formula.

front.xlsx
HI
5X5
6X
7X
8X
9X
10X
11x
12x
13Z
14X
Sheet1
Cell Formulas
RangeFormula
I5I5=SUMPRODUCT(--(ISNA(FORMULATEXT(H5:H14))=TRUE)*(H5:H14="X"))
H6,H9:H10H6="X"
H8H8=IF(1=1,"X","")
 
Upvote 0
Could you use something like this?

Excel Formula:
=COUNTIFS(Table134[Reason For Opening],"*"&$AC$10&"*",Table134[Final Profit],"<1000000")
 
Upvote 0
@Pete, second criteria: "<1000000" may not count rows with "Final profit" >=1,000,000

Try sumproduct:

Code:
=SUMPRODUCT(ISNUMBER(SEARCH($AC$10,Table134[Reason For Opening]))*(Table134[Final Profit]<>""))
 
Upvote 0
@Pete, second criteria: "<1000000" may not count rows with "Final profit" >=1,000,000
That's why I said "something like" as it could easily be changed to "something like" ..

=COUNTIFS(Table134[Reason For Opening],"*"&$AC$10&"*",Table134[Final Profit],"<"&9.9E+307)

.. which should be plenty big enough and still utilise the greater efficiency of COUNTIFS. :)
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,180
Members
449,368
Latest member
JayHo

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