ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   IF, Or, And, or what (https://www.excelbanter.com/new-users-excel/41916-if-what.html)

PA

IF, Or, And, or what
 
Attempting to get a formula to work, with no luck;
Dates will be input into cells G5, H5, I5, and J5.
Formula goes into G6 so that if any of the above four cells in blank, a 0
(zero) is put into G6, if they are all populated return a 1 (one).
I tried =IF(ISBLANK(OR(A1,B1,C1,D1)),"0",1), but it returns a 1 under all
circumstances. This is obviously the wrong approach.
Any suggestions greatly appreciated.
Paul

PA

Sorry, I am going nuts. The formula I tried is

=IF(ISBLANK(OR(G5,H5,I5,J5)),"0",1)

My apologies.

"PA" wrote:

Attempting to get a formula to work, with no luck;
Dates will be input into cells G5, H5, I5, and J5.
Formula goes into G6 so that if any of the above four cells in blank, a 0
(zero) is put into G6, if they are all populated return a 1 (one).
I tried =IF(ISBLANK(OR(A1,B1,C1,D1)),"0",1), but it returns a 1 under all
circumstances. This is obviously the wrong approach.
Any suggestions greatly appreciated.
Paul


Sandy Mann

Try:

=IF(COUNTA(A1:D1)<4,0,1)

--
HTH

Sandy

Replace@mailinator with @tiscali.co.uk


"PA" wrote in message
...
Attempting to get a formula to work, with no luck;
Dates will be input into cells G5, H5, I5, and J5.
Formula goes into G6 so that if any of the above four cells in blank, a 0
(zero) is put into G6, if they are all populated return a 1 (one).
I tried =IF(ISBLANK(OR(A1,B1,C1,D1)),"0",1), but it returns a 1 under all
circumstances. This is obviously the wrong approach.
Any suggestions greatly appreciated.
Paul




PA

Works like a charm - Thank you.

"Sandy Mann" wrote:

Try:

=IF(COUNTA(A1:D1)<4,0,1)

--
HTH

Sandy

Replace@mailinator with @tiscali.co.uk


"PA" wrote in message
...
Attempting to get a formula to work, with no luck;
Dates will be input into cells G5, H5, I5, and J5.
Formula goes into G6 so that if any of the above four cells in blank, a 0
(zero) is put into G6, if they are all populated return a 1 (one).
I tried =IF(ISBLANK(OR(A1,B1,C1,D1)),"0",1), but it returns a 1 under all
circumstances. This is obviously the wrong approach.
Any suggestions greatly appreciated.
Paul





Sandy Mann

You're Welcome.

ISBLANK can only be used with one cell a s cannot cover an array. To use it
the way that you were trying to you would have to use it like:

=IF(OR(ISBLANK(A1),ISBLANK(B1),ISBLANK(C1),ISBLANK (D1)),0,1)


--
Regards

Sandy

Replace@mailinator with @tiscali.co.uk

"PA" wrote in message
...
Works like a charm - Thank you.

"Sandy Mann" wrote:

Try:

=IF(COUNTA(A1:D1)<4,0,1)

--
HTH

Sandy

Replace@mailinator with @tiscali.co.uk


"PA" wrote in message
...
Attempting to get a formula to work, with no luck;
Dates will be input into cells G5, H5, I5, and J5.
Formula goes into G6 so that if any of the above four cells in blank, a
0
(zero) is put into G6, if they are all populated return a 1 (one).
I tried =IF(ISBLANK(OR(A1,B1,C1,D1)),"0",1), but it returns a 1 under
all
circumstances. This is obviously the wrong approach.
Any suggestions greatly appreciated.
Paul







Cutter


Or in G6 type:

=IF(MIN(G5:J5)=0,0,1)

Just an alternative way


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=398426



All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com