ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Returning "1" if 3 criteria are met, "0" if not (https://www.excelbanter.com/excel-discussion-misc-queries/155582-returning-1-if-3-criteria-met-0-if-not.html)

wx4usa

Returning "1" if 3 criteria are met, "0" if not
 
I have 3 columns with misc data. Column A is a date, column B is an
invoice number and C is an expense report number. If all 3 columns
have data entered, I would like to have a formula return the number
"1" if not, "0"

How do I do this?


JLatham[_2_]

Returning "1" if 3 criteria are met, "0" if not
 
One way (assumes we're working in row 2)
=IF(AND(LEN(A2)0,LEN(B2)0,LEN(C2)0),1,0)



"wx4usa" wrote in message
oups.com...
I have 3 columns with misc data. Column A is a date, column B is an
invoice number and C is an expense report number. If all 3 columns
have data entered, I would like to have a formula return the number
"1" if not, "0"

How do I do this?




Ron Rosenfeld

Returning "1" if 3 criteria are met, "0" if not
 
On Fri, 24 Aug 2007 00:53:59 -0000, wx4usa wrote:

I have 3 columns with misc data. Column A is a date, column B is an
invoice number and C is an expense report number. If all 3 columns
have data entered, I would like to have a formula return the number
"1" if not, "0"

How do I do this?


Here's one way:

=--(SUMPRODUCT(--(LEN(A1:C1)0))=3)


--ron

Dave Peterson

Returning "1" if 3 criteria are met, "0" if not
 
Another:

=--(counta(a1:c1)=3)
or
=if(counta(a1:c1)=3,1,0)



wx4usa wrote:

I have 3 columns with misc data. Column A is a date, column B is an
invoice number and C is an expense report number. If all 3 columns
have data entered, I would like to have a formula return the number
"1" if not, "0"

How do I do this?


--

Dave Peterson

Dana DeLouis

Returning "1" if 3 criteria are met, "0" if not
 
Just to mention another option:

= --(COUNTBLANK(A1:C1)=0)

One difference with this vs using COUNTA is that
COUNTA will count a cell with a Prefix Character (ie ') has having data, and
CountBlank will not.

--
Dana DeLouis


"JLatham" wrote in message
...
One way (assumes we're working in row 2)
=IF(AND(LEN(A2)0,LEN(B2)0,LEN(C2)0),1,0)



"wx4usa" wrote in message
oups.com...
I have 3 columns with misc data. Column A is a date, column B is an
invoice number and C is an expense report number. If all 3 columns
have data entered, I would like to have a formula return the number
"1" if not, "0"

How do I do this?







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

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