Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

<> or NOT?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mlv - 08 Apr 2008 18:38 GMT
Hi

Is there any difference in functionality between the following two formulae,
and if so, when would you use one in preference to the other?

 =(A1<>"")

 =(NOT(A1=""))

Thanks
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

Niek Otten - 08 Apr 2008 20:13 GMT
Both give the same result.

But NOT can also negate a more complex expression like A1<>"" AND B2> 3

Personally, I don't like the <> operator. This is because I have a background in the programming language COBOL. In COBOL you had
(have?) the NOT keyword to negate the result of a comparison and you had the NOT IS operator (one operator, consisting of two
"words") which had the same meaning as the <> operator in VBA. And of course there was rhea IS operator.
Here you can get problems in some languages. My native language is Dutch, and it is quite common to say (in Dutch) "If the code is
not equal to 1 or 2 then do something". Many programmers translated this into
IF CODE NOT IS 1 OR 2 THEN......
Of course the code is always unequal to at least one of the two so the answer would always be TRUE.

This may be experienced differently in other languages, I don't know.

But I see no good reason for having a "not equal" operator and I don't like operators of more than one character or word, if those
words or characters also have a meaning if used on their own.

Signature

Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi
|
[quoted text clipped - 6 lines]
|
| Thanks
Niek Otten - 08 Apr 2008 20:19 GMT
<and you had the NOT IS operator >

I should add, in the COBOL dialect we used (ICL 1900)

Signature

Kind regards,

Niek Otten
Microsoft MVP - Excel

| Both give the same result.
|
[quoted text clipped - 23 lines]
||
|| Thanks
Niek Otten - 08 Apr 2008 20:22 GMT
<A1<>"" AND B2> 3>

That's in VBA. In a worksheet it would be

=NOT(AND(A1<>"",B2>3))

Signature

Kind regards,

Niek Otten
Microsoft MVP - Excel

| Both give the same result.
|
[quoted text clipped - 23 lines]
||
|| Thanks
Don Guillett - 08 Apr 2008 20:16 GMT
There appears to be no diff except that you don't need the extra ( )  for
either

You may want to try this to account for the "dreaded space bar"
=TRIM(A1)<>""
Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> Hi
>
[quoted text clipped - 6 lines]
>
> Thanks
Rick Rothstein (MVP - VB) - 08 Apr 2008 20:35 GMT
You missed one....

=LEN(A1)>0

As for differences... the NOT and LEN ones require a function call whereas
the <> one doesn't... there may be an cost involved in calling the functions
that doesn't exist in the <> formula (which might matter if you have a large
number of formulas doing performing this functionality).

Rick

> Hi
>
[quoted text clipped - 6 lines]
>
> Thanks
Dana DeLouis - 08 Apr 2008 22:08 GMT
Another option might be:
=ISBLANK(A1)

However, if A1 has only the prefix character '
then  =ISBLANK(A1) returns False
and   =A1=""   returns True.

Just something to keep in mind...
- -
Dana Delouis

> Hi
>
[quoted text clipped - 6 lines]
>
> Thanks
mlv - 09 Apr 2008 16:40 GMT
I wrote:

> Is there any difference in functionality between the following two
> formulae, and if so, when would you use one in preference
[quoted text clipped - 3 lines]
>
>  =(NOT(A1=""))

Thanks for all the useful information.
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.