Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Multiple IF statement not working

I have numbers in cells b2, d2,e2, and f2. I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:

=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))

Does anyone know why?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Multiple IF statement not working

Try this
=B2+COUNTIF(D2:F2,"=1")

--
Wag more, bark less


"Anthony" wrote:

I have numbers in cells b2, d2,e2, and f2. I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:

=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))

Does anyone know why?

.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Multiple IF statement not working

On Dec 17, 11:31*am, Brad wrote:
Try this
=B2+COUNTIF(D2:F2,"=1")

--
Wag more, bark less



"Anthony" wrote:
I have numbers in cells b2, d2,e2, and f2. *I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. *The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:


=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))


Does anyone know why?


.- Hide quoted text -


- Show quoted text -


Brad,
For some reason this did not work. It gave me the following: #VALUE!
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Multiple IF statement not working

On Dec 17, 11:31*am, Brad wrote:
Try this
=B2+COUNTIF(D2:F2,"=1")

--
Wag more, bark less



"Anthony" wrote:
I have numbers in cells b2, d2,e2, and f2. *I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. *The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:


=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))


Does anyone know why?


.- Hide quoted text -


- Show quoted text -


I figured it our. Sorry and thanks for your help.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Multiple IF statement not working

B2 must not have a value in it to get this message

What is in B2, D2, E2, F2?

or you can do this
=IF(ISNUMBER(B2),B2,0)+COUNTIF(B2:D2,"=1")
--
Wag more, bark less


"Anthony" wrote:

On Dec 17, 11:31 am, Brad wrote:
Try this
=B2+COUNTIF(D2:F2,"=1")

--
Wag more, bark less



"Anthony" wrote:
I have numbers in cells b2, d2,e2, and f2. I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:


=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))


Does anyone know why?


.- Hide quoted text -


- Show quoted text -


Brad,
For some reason this did not work. It gave me the following: #VALUE!
.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Multiple IF statement not working

If you can, click the "Yes" button asking if the post answered the question...
--
Wag more, bark less


"Anthony" wrote:

On Dec 17, 11:31 am, Brad wrote:
Try this
=B2+COUNTIF(D2:F2,"=1")

--
Wag more, bark less



"Anthony" wrote:
I have numbers in cells b2, d2,e2, and f2. I am trying to write
statment that will increment number in cell b2 by one for each cell
(d2, e2, f2) that is greater than or equal to one. The following
formula will not work if more than one cell (d2, e2, f2) has a zero in
it:


=IF(AND(D2=1,E2=1,F2=1),B2+3,IF(OR(D2=0,E2=0,F2 =0),B2+2,IF(AND
(D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2= 0,F2=0),B2+1,)))))


Does anyone know why?


.- Hide quoted text -


- Show quoted text -


I figured it our. Sorry and thanks for your help.
.

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
IF Statement not working steve12173 Excel Worksheet Functions 7 June 18th 09 06:44 PM
IF Statement not working Barrett M Excel Worksheet Functions 8 May 6th 08 03:29 PM
If statement working only once Lime Excel Worksheet Functions 0 May 5th 08 03:58 AM
If Statement Not Working Telegirl Excel Worksheet Functions 9 May 12th 07 04:34 PM
IF statement not working TJAC Excel Discussion (Misc queries) 2 January 13th 06 01:08 PM


All times are GMT +1. The time now is 08:51 AM.

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"