PDA

View Full Version : Help on IF conditional statements



seval
02-14-2008, 08:48 PM
Hi All,

Would appreciate if any one could help me with this.

I have 2 columns, A and B. For cells in column A, there's a listbox of choices, Yes and No. I want to program column B to automatically turn 0 if the cell in A is No and blank if A=Yes. I've tried =IF (A1="No", "0", IF (A1="Yes", "")) but it doesn't work. So, how should I program it to do that?

Thanks to anyone who response to this.

mikerickson
02-14-2008, 09:27 PM
This should do what you want.

=IF(A1="No", 0, "")

seval
02-14-2008, 10:56 PM
This should do what you want.

=IF(A1="No", 0, "")

Hi,

Thank you for your reply. I tried your formula but it still doesn't work. I'm not sure what's wrong.

mikerickson
02-14-2008, 11:31 PM
What is it doing that you don't like?

seval
02-14-2008, 11:50 PM
What is it doing that you don't like?

It doesn't do anything. It doesn't automatically reflect the value "0" in column B when I clicked "No" in Column A. It's still blank.

mikerickson
02-15-2008, 12:11 AM
What happens when you type "No" in A1?

seval
02-15-2008, 12:25 AM
What happens when you type "No" in A1?

In the worksheet that I'm working in, I tried to use to the list box to select the choice and it doesn't work. I tried to type "no" manually and it doesn't work too. But, when I tried the same formula on a new workbook to test out, it works when i type "no" in cell A1. So, I'm not sure what's wrong with the worksheet that I'm working on.

mikerickson
02-15-2008, 12:30 AM
A1 needs to be connected to the list box.
What kind of list box is it, Validation, Forms menu or ActiveX?
Where is it getting the values "Yes" and "No"?

Aussiebear
02-15-2008, 01:58 AM
Rather than using a listbox to select the value, try just using validation (Yes/No) and then with mikerickson's formula it should work

seval
02-18-2008, 08:50 AM
A1 needs to be connected to the list box.
What kind of list box is it, Validation, Forms menu or ActiveX?
Where is it getting the values "Yes" and "No"?

I'm using validation on column A.

mikerickson
02-18-2008, 09:59 AM
The only thing I can think of is, is Calculation Manual?