Help on an if then statement!

  • Thread starter Thread starter sed
  • Start date Start date
S

sed

A B C D
E
1 Name Age Country Last Name

2 Sed 22 USA Doe

3 Mike 37 UK Dane

My question is this... How can I get cell E1 to turn into a 1 in the case
that if and only if there is text in cells a2, b2, c2, d2... if one of them
doesnt have text it has to become a 0.
Appreciate the help!
 
=--(counta(a2:d2)=4)
will return 1 if all 4 cells have something in them

The =counta() counts the number of cells that contain anything--even formulas.
=counta()=4
will return true or false.
The -- will change the true to 1 and false to 0.
 
Or, if you really like, you can remove the IF and the AND statement.
E1: =ISTEXT(A2)*ISTEXT(B2)*ISTEXT(C2)*ISTEXT(D2)
 
If you mean that return value is zero if any of the cells is blank then
=--OR(ISBLANK(A2),ISBLANK(B2),ISBLANK(C2),ISBLANK(D2))

Regards,
Stefi

„sed†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top