Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sed sed is offline
external usenet poster
 
Posts: 24
Default Help on an if then statement!

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!



--
sss
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Help on an if then statement!

=IF(AND(ISTEXT(A2),ISTEXT(B2),ISTEXT(C2),ISTEXT(D2 )),1,0)

Hope this helps.
--
John C


"sed" wrote:

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!



--
sss

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Help on an if then statement!

=--(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.



sed wrote:

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!

--
sss


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
sed sed is offline
external usenet poster
 
Posts: 24
Default Help on an if then statement!

Thanks a lot John C I appreciate it!
--
sss


"John C" wrote:

=IF(AND(ISTEXT(A2),ISTEXT(B2),ISTEXT(C2),ISTEXT(D2 )),1,0)

Hope this helps.
--
John C


"sed" wrote:

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!



--
sss

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Help on an if then statement!

Or, if you really like, you can remove the IF and the AND statement.
E1: =ISTEXT(A2)*ISTEXT(B2)*ISTEXT(C2)*ISTEXT(D2)
--
John C


"John C" wrote:

=IF(AND(ISTEXT(A2),ISTEXT(B2),ISTEXT(C2),ISTEXT(D2 )),1,0)

Hope this helps.
--
John C


"sed" wrote:

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!



--
sss



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Help on an if then statement!

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:

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!



--
sss

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Help on an if then statement!

You are welcome, don't forget to check the little YES box below :)
--
John C


"sed" wrote:

Thanks a lot John C I appreciate it!
--
sss


"John C" wrote:

=IF(AND(ISTEXT(A2),ISTEXT(B2),ISTEXT(C2),ISTEXT(D2 )),1,0)

Hope this helps.
--
John C


"sed" wrote:

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!



--
sss

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"