ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to check several cells for a value =0 and if true enter "1" (https://www.excelbanter.com/excel-discussion-misc-queries/130168-how-check-several-cells-value-%3D0-if-true-enter-1-a.html)

Russell

how to check several cells for a value =0 and if true enter "1"
 
Looking at the example below

Col A Col B Col C Col D Col E Col F
date a date b time diff date c time diff complete
14-Apr-06 14-Apr-06 0 20-Jun-06 67
16-Apr-06 19-May-06 33 04-Jul-06 46
14-Apr-06 15-Apr-06 1 20-Jun-06 66
16-Apr-06 19-May-06 33 -38856

For each row, I need to enter a "1" in Column F only if the values in
Columns C and E both has positive values equal to or greater than 0.

Can you help please






--
Russell

Mike D.

how to check several cells for a value =0 and if true enter "1"
 
I believe this will work:

=IF(AND(B2=0,C2=0),1,0)

"Russell" wrote:

Looking at the example below

Col A Col B Col C Col D Col E Col F
date a date b time diff date c time diff complete
14-Apr-06 14-Apr-06 0 20-Jun-06 67
16-Apr-06 19-May-06 33 04-Jul-06 46
14-Apr-06 15-Apr-06 1 20-Jun-06 66
16-Apr-06 19-May-06 33 -38856

For each row, I need to enter a "1" in Column F only if the values in
Columns C and E both has positive values equal to or greater than 0.

Can you help please






--
Russell


Mike D.

how to check several cells for a value =0 and if true enter "
 
Sorry ... actually, the formula should be:

=IF(AND(B2=0,E2=0),1,0)


"Mike D." wrote:

I believe this will work:

=IF(AND(B2=0,C2=0),1,0)

"Russell" wrote:

Looking at the example below

Col A Col B Col C Col D Col E Col F
date a date b time diff date c time diff complete
14-Apr-06 14-Apr-06 0 20-Jun-06 67
16-Apr-06 19-May-06 33 04-Jul-06 46
14-Apr-06 15-Apr-06 1 20-Jun-06 66
16-Apr-06 19-May-06 33 -38856

For each row, I need to enter a "1" in Column F only if the values in
Columns C and E both has positive values equal to or greater than 0.

Can you help please






--
Russell


Teethless mama

how to check several cells for a value =0 and if true enter "1"
 
=AND(C2=0,E2=0)+0


"Russell" wrote:

Looking at the example below

Col A Col B Col C Col D Col E Col F
date a date b time diff date c time diff complete
14-Apr-06 14-Apr-06 0 20-Jun-06 67
16-Apr-06 19-May-06 33 04-Jul-06 46
14-Apr-06 15-Apr-06 1 20-Jun-06 66
16-Apr-06 19-May-06 33 -38856

For each row, I need to enter a "1" in Column F only if the values in
Columns C and E both has positive values equal to or greater than 0.

Can you help please






--
Russell


Teethless mama

how to check several cells for a value =0 and if true enter "1"
 
Another approach

=(MIN(C2,E2)=0)+0


"Russell" wrote:

Looking at the example below

Col A Col B Col C Col D Col E Col F
date a date b time diff date c time diff complete
14-Apr-06 14-Apr-06 0 20-Jun-06 67
16-Apr-06 19-May-06 33 04-Jul-06 46
14-Apr-06 15-Apr-06 1 20-Jun-06 66
16-Apr-06 19-May-06 33 -38856

For each row, I need to enter a "1" in Column F only if the values in
Columns C and E both has positive values equal to or greater than 0.

Can you help please






--
Russell



All times are GMT +1. The time now is 04:26 AM.

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