Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help Me with Custom menus Mr BT Excel Worksheet Functions 7 July 4th 06 05:15 PM
Linked Check Boxes blueegypt Excel Discussion (Misc queries) 4 May 12th 06 10:36 PM
Enter Time in cells mrdata Excel Discussion (Misc queries) 3 March 25th 06 01:49 AM
Validate MsgBox Entry to Data in Cells David Excel Discussion (Misc queries) 13 December 21st 05 10:31 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"