View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
wrkingurl wrkingurl is offline
external usenet poster
 
Posts: 5
Default Comparing 2 text cells in an if statement

Thank you Joel2004! I tried the first statement and it worked perfectly.
You really saved me big time, I appreciate it!
--
thanks,
Wurkingurl


"JoeU2004" wrote:

"wrkingurl" wrote:
What I need, is another IF statement in column C2 that is:
If A2 = No and B2 = No then column c2 would read OK, else, NOT OK


Ostensibly, the following should work (in C2):

=if(and(A2="No",B2="No"),"OK","NOT OK")

But you write:
I can do this with numbers, but am having trouble with bringing
back results from anything that is Text.


If you tried the above (by copy-and-paste) and it still does not work, the
problem might leading or trailing spaces about the text. Try:

=if(and(trim(A2)="No",trim(B2)="No"),"OK,"NOT OK")

If neither of those work for you, I suggest that you post the exact contents
of A2 and B2, allow with the results of TYPE() and LEN(). As I recall,
TRIM() does work with some other ASCII characters that appear as
"whitespace" (blank space).


----- original posting -----

"wrkingurl" wrote in message
...

Example:
Column A2 = NO (this is from an if statement)
Column B2 = NO (this is from an if statement)

What I need, is another IF statement in column C2 that is:
If A2 = No and B2 = No then column c2 would read OK, else, NOT OK

I can do this with numbers, but am having trouble with bringing back
results
from anything that is Text.
--
thanks,
Wurkingurl