Issue comparing 2 ranges and giving a result with a formula

Jmoz092

Board Regular
Joined
Sep 8, 2017
Messages
184
Office Version
  1. 365
  2. 2011
Platform
  1. Windows
  2. MacOS
I thought this would be a pretty straight forward formula to create, but I'm not getting the result that I intended.

I have a few dozen check boxes on a worksheet(Sheet1). I have their values displayed in cells on a different worksheet(Sheet6).

I've transposed the values on Sheet6 to Sheet1 (for other reasons) and in the column next to those values (TRUE or FALSE), I have a column with a countA function. It is counting a range of 5 cells in a column and displaying the number of non-blank cells. This is working fine.

Now, in the next column, I want to compare the TRUE/FALSE column to the countA column for a result...either "Good" or "Bad".

If the first column has "TRUE" and the next column is >0, I want to return "Good".
If the first column is "TRUE" and the next column is 0, I want to return "Bad".
If the first column is "FALSE", I want to return "Bad"

I tried this with if(and) formulae also, but it wasn't working with that either. Is this a problem with referencing the value of a check box in a cell's formula??

Any help is much appreciated, as always.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]CheckBox Value[/TD]
[TD]Range CountA Value[/TD]
[TD]Good or Bad[/TD]
[/TR]
[TR]
[TD]TRUE[/TD]
[TD]1[/TD]
[TD]Good[/TD]
[/TR]
[TR]
[TD]TRUE[/TD]
[TD]0[/TD]
[TD]Bad[/TD]
[/TR]
[TR]
[TD]FALSE[/TD]
[TD]0[/TD]
[TD]Bad[/TD]
[/TR]
[TR]
[TD]FALSE[/TD]
[TD]1[/TD]
[TD]Bad[/TD]
[/TR]
</tbody>[/TABLE]


Something like this. How can I put this into a formula?
 
Upvote 0
Try:

=IF(AND(A1<>"",B1<>""),IF(OR(A1=FALSE,AND(A1=TRUE,B1=0)),"Bad",IF(AND(A1=TRUE,B1>0),"Good","No result")),"")
 
Upvote 0
That did it. I feel like such an idiot for not nesting the conditions far enough, that was the issue. Thank you very much Steve!!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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