# IF And?

#### DougStroud

##### Well-known Member
The following formula is in CF, but is not setup correctly. It is not proving true.

Formula:
=IF(AND(Y38="",X38<>"","Cost?",""))

If Y38 is blank
If X38 is not blank
then Cost?
else blank

thanks

ds

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
doug

You say this is in CF, do you mean conditional formatting?

Hi, Doug,

AND(Y38="",X38<>"")

kind regards,
Erik

Yes.... sorry thought that was the standard defacto abbreviation

HI DougStroud,

also if you are trying to return Cost if the x and y values are true you need to close the AND bracket first.

=IF(AND(Y38="",X38<>""),"Cost?","")

Hope it helps

Richard

looks like you have a braket in the wrong place

try

Code:
``=IF(AND(Y38="",X38<>""),"Cost?","")``

Hi Erik,
long time since I have chatted w/ you.

I had that particular formula working. But I wanted to add the condition IF, I am unable to see how this is to work.

CF: =AND(Y38="",X38<>"")

doug

In the formula you posted you seem to want to return either Cost? or "".

Now that might work in CF, but probably won't.

When using formulas in CF Excel excepts either a TRUE or FALSE value.

Try Erik's formula.

Thanks Norie. No it does not work in CF, you are correct.

Erik-- as I wrote previously, I had the same formula you showed me already. I wanted to add the IF. But as Norie pointed out, this is not correct.

Thanks both of you

Doug

Replies
3
Views
161
Replies
2
Views
307
Replies
36
Views
1K
Replies
2
Views
230
Replies
1
Views
368

1,203,524
Messages
6,055,907
Members
444,832
Latest member
bgunnett8

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