Correlations

Pezgordo

Board Regular
Joined
Jan 28, 2011
Messages
61
I have 8 correlations in a countifs formula. If all 8 correlations are present than the formula gives me the number of O's or U's (whichever letter is selected at the end of the formula). Here is a sample of the formula:

=COUNTIFS($Q$7:$Q$2870,"<18.26",$R$7:$R$2870,"<214.46",$T$7:$T$2870,"<-6.5",$U$7:$U$2870,"<1.41",$AM$7:$AM$2870,"<19.14",$AQ$7:$AQ$2870,"<365.52",$AW$7:$AW$2870,"<5.39",$BC$7:$BC$2870,"<24.82",$JD$7:$JD$2870,"u")

Is it possible to have the formula give me the number of O's or U's if only 5 or 6 of the 8 correlations are present?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
To get the number of U's if only 5 correlations are present, maybe this Array-formula

=SUM(IF(((($Q$7:$Q$2870<18.26)+($R$7:$R$2870<214.46)+($T$7:$T$2870<-6.5)+($U$7:$U$2870<1.41)+($AM$7:$AM$2870<19.14)+($AQ$7:$AQ$2870<365.52)+($AW$7:$AW$2870<5.39)+($BC$7:$BC$2870<24.82))*($JD$7:$JD$2870="u"))=5,1))

Ctrl+Shift+Enter

HTH

M.
 
Upvote 0
or this regular formula

=SUMPRODUCT(--(((($Q$7:$Q$2870<18.26)+($R$7:$R$2870<214.46)+($T$7:$T$2870<-6.5)+($U$7:$U$2870<1.41)+($AM$7:$AM$2870<19.14)+($AQ$7:$AQ$2870<365.52)+($AW$7:$AW$2870<5.39)+($BC$7:$BC$2870<24.82))*($JD$7:$JD$2870="u"))=5))

M.
 
Upvote 0
Both formulas worked. Obrigado.

However, I do have a question. When I run my original formula I get U=302 & O=184 (out of a total of 2863 rows). When I run this modified formula I get U=158 & O=152. Since the new formula(s) are asking for any 5 of the 8 correlations (and not all 8), shouldn't there be more matches than the original? In other words shouldn't the number of U's and O's increase instead of decrease?
 
Upvote 0
Hi,

The formulas should produce the same result.

I made a test with a very small data-sample (10 rows and 5 columns) and the two formulas worked ok and produced the same result.

I also checked if there is a typo, or something like that, in the formulas i posted, but couldn't find anything...

I dont know why you are getting different results :confused:

M.

-EDIT-
I misunderstood your post

Is possible to have less matches with only 5, than with 8 correlations.

If you want 5 or more correlations this is a different question. You have to change = 5 to >=5

M.
 
Last edited:
Upvote 0
Marcelo, the 2nd formula worked great w/ the >=5. It produced U=740 & O=563. Thank you again for the help.

Tim
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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