Excel: Simple If (not) formula help

COACHTEEJ

New Member
Joined
Jul 5, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
I have a list in column A:
Apple
Banana
Cherries
Dates

I want column B to Give me a value of "1" for every Apple
I want column C to give me a value of "1" for every thing that is NOT an apple BUT not a value for Blank spaces
I can not get Column C to work. I can get it to work but get a value of "1" for blank spaces and everything that is not an apple.

This is what I have used- Open to any fix:

B2=IF(A2="Apples","1","0")
C2=IF(NOT(A2="Apples"), "1","0")
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi & welcome to MrExcel.
How about
=if(and(a2<>"",a2<>"Apples"),1,0)
 
Upvote 0
Maybe like this?

Book1
ABC
1is AppleIs NOT Apple, nor Blank
2Apple10
3Banana01
4Cherries01
5Dates01
600
7 00
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=(A2="Apple")*1
C2:C7C2=(AND(A2<>"Apple",TRIM(A2)<>""))*1
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,048
Messages
6,122,862
Members
449,097
Latest member
dbomb1414

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