=IF help

CrazyCanuck

New Member
Joined
Oct 30, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I am using this formula so that if these 2 cells are equal I get 1 if not I get 0. But I don't want the 1 to show if cells B2 and D2 are empty. What can I add to my formula to have empty cells not appear as equal?


=IF(B2=D2,"1","")
 

Attachments

  • minisheet.PNG
    minisheet.PNG
    9.8 KB · Views: 5

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Maybe this:

Excel Formula:
=IF(AND(B2=D2,B2<>"",D2<>""),"1","")
 
Upvote 0
Maybe this:

Excel Formula:
=IF(AND(B2=D2,B2<>"",D2<>""),"1","")
A relatively minor thing but surely not so may checks are required. I would also be surprised if the 1 needs to be in quote marks.

Excel Formula:
=IF(AND(B2=D2,B2<>""),1,"")
 
Upvote 0

Forum statistics

Threads
1,216,051
Messages
6,128,505
Members
449,455
Latest member
jesski

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