If then (text or no text)

Solved/Closed
hikkup Posts 3 Registration date Friday April 4, 2014 Status Member Last seen April 4, 2014 - Apr 4, 2014 at 05:28 AM
hikkup Posts 3 Registration date Friday April 4, 2014 Status Member Last seen April 4, 2014 - Apr 4, 2014 at 10:00 AM
Hi,

I hope someone can help me with this. I would like to create a formula that says this:

if a certain cell contains ANY text, then write "6.2"
if the cell is empty, then write "0"

I would imagine this to be simple but apparently, it's not simple enough for me to figure out :-)

Any thoughts?

Thanks,
Cynthia

4 replies

Blocked Profile
Apr 4, 2014 at 08:14 AM
Ok, Cynthia, hang in there.

The format for an IF() statement is as follows:
=if(logic_test,true,false)

So, your formula would look something like this; with the value to check is in Cell A1:

=IF(A1<>"","6.2",0)

Which says, if cell A1 doesn't equal "empty content", display "6.2", if it does equal "empty content", then display 0.

I hope this helps! Have FUN!

0
hikkup Posts 3 Registration date Friday April 4, 2014 Status Member Last seen April 4, 2014
Apr 4, 2014 at 09:12 AM
Works like a charm - thanks!

Unfortunately, now I have a new problem. Before I used the formula, I used to type in the values myself (6.2 or 0). At the bottom, I arranged an autosum to calculate the totals.

Now with the new formula, the total is not calculated correctly (i.e., not at all). Obviously, Excel now "sees" formulas instead of numbers.

Can I still arrange an autosum?

Thanks.
0
Blocked Profile
Apr 4, 2014 at 09:44 AM
We can fix that. Take the Quotes off the "6.2" value, and make them integer values 6.2. I just tested it, and it works that way! =if(a1<>"",6.2,0)

Have FUN!

"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
0
hikkup Posts 3 Registration date Friday April 4, 2014 Status Member Last seen April 4, 2014
Apr 4, 2014 at 10:00 AM
Yesss! Problem solved!

Big thank you!!
0