What is Excel equivalent of Lotus #AND# function?

Barry Katcher

Well-known Member
Joined
Feb 25, 2002
Messages
4,053
I would like cell B1 to return the value in cell A1 if that value is either 1 or greater (the number of coffins sold to customers) or if it is minus 1 or less (the number of coffins returned by dissatisfied customers). If the value is between those two, i.e. .5, 0 or NO ENTRY AT ALL, I would like B1 to return "Incorrect Input, Fool!"

The Lotus formula was:
@IF(A1>1#AND#A1<-1,"Incorrect Input, Fool",A1)

The AND function in Excel seems to only return TRUE or FALSE.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You need a nested IF for that...

=IF(A1>=1,A1,IF(A1<=-1,A1,"Incorrect input fool!"))

Rgds
AJ
 
Upvote 0
On 2002-04-04 13:28, Barry Katcher wrote:
I would like cell B1 to return the value in cell A1 if that value is either 1 or greater (the number of coffins sold to customers) or if it is minus 1 or less (the number of coffins returned by dissatisfied customers). If the value is between those two, i.e. .5, 0 or NO ENTRY AT ALL, I would like B1 to return "Incorrect Input, Fool!"

The Lotus formula was:
@IF(A1>1#AND#A1<-1,"Incorrect Input, Fool",A1)

The AND function in Excel seems to only return TRUE or FALSE.

=IF(OR(A1>1,A1<-1),A1,"Incorrect Input, Fool")

or, better:

=IF(ABS(A1)>=1,A1,"Incorrect Input, Fool")

or, even better:

=IF((ABS(A1)>=1)*(A1-INT(A1)=0),A1,"Incorrect Input, Fool")
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top