Frequency problem desperate for solution!

Supermike1983

New Member
Joined
Oct 4, 2016
Messages
15
I have a frequency problem I don't seem to find a solution for. Below you find an extract of just the columns I want to compare.

I want to write a frequency condition saying: "How many values in Column C does only include D values in Column G and FALSE in Column L?".

In this small example below the correct answer is 1 time.

Column CColumn GColumn L
6548923AFALSE
6548923AFALSE
6548923BTRUE
6548923DFALSE
14834568DFALSE
14834568DFALSE
8746985AFALSE
8746985BTRUE
8746985DTRUE

<tbody>
</tbody>

The closest I get is this array formula:

{=SUM(IF(FREQUENCY(IF($C$2:Report!$C$10<>"";IF($L$2:$L$10="FALSE";IF($G$2:$G$10="D";MATCH("~"&$C$2:$C$10;$C$2:$C$10&"";0))));ROW($C$2:$C$10)-ROW($C$2)+1);1))}

Desperately need help!
 
I suggest a helper column, say column N. Something like this


N
1
Newest Date?​
2
No​
3
No​
4
No​
5
Yes​
6
No​
7
Yes​
8
Yes​
9
No​
10
No​

<tbody>
</tbody>


Array formula in N2 copied down
=IF(M2=MAX(IF($C$2:$C$10=C2,$M$2:$M$10)),"Yes","No")
Ctrl+Shift+Enter

Then, to count the unique values, try this array formula
=SUM(IF(FREQUENCY(IF(C2:C10<>"",IF(G2:G10="D",IF(L2:L10=FALSE,IF(N2:N10="Yes",MATCH(C2:C10,C2:C10,0))))),ROW(C2:C10)-ROW(C2)+1),1))
Ctrl+Shift+Enter

M.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
oops...
It seems that your Excel uses ; (semi-colon) as argument separator. So on each formula above replace , by ;

M.
 
Upvote 0
I suggest a helper column, say column N. Something like this


N
1
Newest Date?​
2
No​
3
No​
4
No​
5
Yes​
6
No​
7
Yes​
8
Yes​
9
No​
10
No​

<tbody>
</tbody>


Array formula in N2 copied down
=IF(M2=MAX(IF($C$2:$C$10=C2,$M$2:$M$10)),"Yes","No")
Ctrl+Shift+Enter

Then, to count the unique values, try this array formula
=SUM(IF(FREQUENCY(IF(C2:C10<>"",IF(G2:G10="D",IF(L2:L10=FALSE,IF(N2:N10="Yes",MATCH(C2:C10,C2:C10,0))))),ROW(C2:C10)-ROW(C2)+1),1))
Ctrl+Shift+Enter

M.

In my "real" business case I can't predict the values in Column C and the dates in Column M. Do I in this case with the formula you provided me with need to sort for example the column C to get this right or is it applicable even if the numbers in Column C is totally random? The randomness is my main problem!
 
Upvote 0
What exactly do you mean by
In my "real" business case I can't predict the values in Column C and the dates in Column M.

I'm confused..
Well, stating the obvious ... the formula works if there are data in columns C, G, L and M
Could you, please, clarify

M.
 
Upvote 0
What exactly do you mean by


I'm confused..
Well, stating the obvious ... the formula works if there are data in columns C, G, L and M
Could you, please, clarify

M.

I was just thinking of the formulas in any way were specific regarding the example I stated. In my real document I can't predict the values etc.

But if it only is as you say, that the formulas are not value-specific more than that there needs to be a values in the column it's all good!

Thank you once again Marcelo, you've been more than helpful to me!
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,726
Members
449,465
Latest member
TAKLAM

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