I am trying to insert the R squared formula as follows:

=RSQ(Known_ys, Known_xs) ONLY if row(i)= "YES" and ignore the rest of the data. For instance, the below should calculate RSQ excluding the rows where values in column C ="NO". I tried the following formula, but it didnt work: = {IF(C1:C4="YES",RSQ(B1:B4,A1:A4),"")}

A B C
6.2 3.79 YES
7.2 4.56 NO
8.8 6.22 YES
4.5 8.9 YES
1

1 Answer

♣SOLVED♣

Here you go (in relation to screenshot below):

=RSQ(IF($C$1:$C$4="YES",B1:B4,""),IF(C1:C4="YES",A1:A4,"")) 

Conditional RSQ formula

Ta, J

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.