0

I am trying to create an IF statement from a drop down menu where I have made the options Yes or No.

I have gone for: =IF(B2=''Yes'',D5,0). This is giving me an error.

However when I try: =IF(B2=Yes,D5,0), it says I have used the wrong data type. Can anyone help?

1
  • What is the error you receive? What type of drop-down you have. I suppose drop-down is in / linked to B2, is that right? what happens if you type =B2, or =ISTEXT(B2)? Jul 6, 2015 at 14:10

1 Answer 1

2

You're using 2 single quotes marks, '', which also gives me an error.

You need to use double quote ". Copy and paste the code below in your Excel sheet.

=IF(B2="Yes",D5,0) 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .