# Formula Question

#### levanoj

##### Active Member
I have 3 columns (A:C) where each cell will have either a "Yes" or "No" value in it. What I'm looking for is a formula I can enter in column D that will compare each cell of the 3 columns and within the same row and if all three values are "No" then the result will say "Spare" but if any cell has a "Yes" value then the result would say "In Use". I tried using the following formula but the result always came out as "In Use":

=IF(A2=B2=C2,"Spare","In Use")

Can anyone assist or tell me what I'm doing wrong?

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
=IF(AND(A2="No",B2="No",C2="No"),"Spare","In Use")

Awesome, thanks Joe4.

=IF(COUNTIF(A2:C2,"Yes"),"In Use","Spare")

Replies
9
Views
222
Replies
2
Views
106
Replies
3
Views
208
Replies
3
Views
179
Replies
6
Views
261

1,203,464
Messages
6,055,570
Members
444,799
Latest member
CraigCrowhurst

### 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.

### Which adblocker are you using?

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

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