May 6, 2004 #1 cdove MIS Joined Mar 20, 2002 Messages 153 Location GB Is it possible to use an IF statement to have a value of 1 if a cell has text in and 0 if no text exists? eg IF (Cell contains text) = "1", "0
Is it possible to use an IF statement to have a value of 1 if a cell has text in and 0 if no text exists? eg IF (Cell contains text) = "1", "0
May 6, 2004 #2 tviman Programmer Joined Jul 25, 2002 Messages 2,123 Location US Absolutely! =if(a1>0,a1+b1,"") There's always a better way. The fun is trying to find it! Upvote 0 Downvote
May 6, 2004 1 #3 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US Hi, [tt] =IF(ISBLANK(A1),1,0) [/tt] and... why do you want the CHARACTERS "0" & "1" rather than the NUMBERS 0 & 1??? Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Hi, [tt] =IF(ISBLANK(A1),1,0) [/tt] and... why do you want the CHARACTERS "0" & "1" rather than the NUMBERS 0 & 1??? Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
May 6, 2004 #4 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US oops [tt] =IF(ISBLANK(A1),0,1) [/tt] Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
oops [tt] =IF(ISBLANK(A1),0,1) [/tt] Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
May 6, 2004 #5 ajakeway MIS Joined May 3, 2004 Messages 6 Location CA Interestingly, this also works. =1-ISBLANK(B1) Perhaps not as readable, but I find I can use the Boolean True / False (treated as 1/0) in all sorts of places. Upvote 0 Downvote
Interestingly, this also works. =1-ISBLANK(B1) Perhaps not as readable, but I find I can use the Boolean True / False (treated as 1/0) in all sorts of places.
May 6, 2004 #6 KenWright Technical User Joined Mar 22, 2003 Messages 3,688 Location GB And if you really want to cut it down, and assuming the choice is text or Not text as stated, then =--ISTEXT(B1) will also do the job, though not as generic as the others, which also cater for numerics, which this won't. Regards Ken................. ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ---------------------------------------------------------------------------- Upvote 0 Downvote
And if you really want to cut it down, and assuming the choice is text or Not text as stated, then =--ISTEXT(B1) will also do the job, though not as generic as the others, which also cater for numerics, which this won't. Regards Ken................. ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ----------------------------------------------------------------------------
May 7, 2004 Thread starter #7 cdove MIS Joined Mar 20, 2002 Messages 153 Location GB Thanks Everyone. I eventually went for SkipVought.. Upvote 0 Downvote
May 7, 2004 #8 Dreamboat Instructor Joined Nov 7, 1999 Messages 4,881 Location US I went for SkipVought once too, and then find out he was married! Anne Troy http://www.amazon.com/exec/obidos/tg/detail/-/0972425845/104-9778384-2391158?v=glance&s=books Upvote 0 Downvote
I went for SkipVought once too, and then find out he was married! Anne Troy http://www.amazon.com/exec/obidos/tg/detail/-/0972425845/104-9778384-2391158?v=glance&s=books
May 7, 2004 #9 KenWright Technical User Joined Mar 22, 2003 Messages 3,688 Location GB LOL ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ---------------------------------------------------------------------------- Upvote 0 Downvote
LOL ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ----------------------------------------------------------------------------
May 7, 2004 #10 cranebill IS-IT--Management Joined Jan 4, 2002 Messages 1,113 Location US <=== Not married lol Bill Upvote 0 Downvote
May 7, 2004 #11 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US Geez, I was out cutting the lawn and felt these STRANGE VIBES!!! Little did I know I'd become the HOTTIE of Tek-Tips at the late age of 62! What will my WIFE say??? ;-) Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Geez, I was out cutting the lawn and felt these STRANGE VIBES!!! Little did I know I'd become the HOTTIE of Tek-Tips at the late age of 62! What will my WIFE say??? ;-) Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884