Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default "add parenthesis"

I type in the following formula and keep getting the error message that it is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. However, I have added them everywhere I can think of it is
still getting rejected. BTW, what I am trying to tell Excel is "If there is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default "add parenthesis"

You can't use COUNTIF like that - it only works with one condition,
and you normally apply that condition over a range. Try this instead:

=SUMPRODUCT((Attendance!D6:D100=0)*(Violations!C6: C100="X"))

this checks the ranges from rows 6 to 100 and counts if the criteria
are met.

Hope this helps.

Pete

On Jan 18, 4:58*pm, PatrickP
wrote:
I type in the following formula and keep getting the error message that it is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. *However, *I have added them everywhere I can think of it is
still getting rejected. *BTW, what I am trying to tell Excel is "If there is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default "add parenthesis"

Pete has commented on what formula you need, but to answer your original
question about the parentheses, they need to come in pairs, so for every
opening parenthesis [ ( ] you need a closing one [ ) ]. You've got 2
opening and one closing.

You can't, of course, just scatter parentheses at random, and you'll need to
check in Excel help what the syntax of each Excel function is, and make sure
that the appropriate parameters are given for each function, separated where
necessary by commas and surrounded where necessary by parentheses.

In your case your AND function is there with valid syntax, with 2 boolean
conditions separated by a comma and surrounded by parentheses, but you would
need to remind your self what parameters COUNTIF is looking for (a range and
a criterion), and that would need to be suitably punctuated.
--
David Biddulph

"PatrickP" wrote in message
...
I type in the following formula and keep getting the error message that it
is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. However, I have added them everywhere I can think of it is
still getting rejected. BTW, what I am trying to tell Excel is "If there
is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default "add parenthesis"

Pete:

With a minor modification regarding the range, that seems to have done the
trick. Thank you so much!

"Pete_UK" wrote:

You can't use COUNTIF like that - it only works with one condition,
and you normally apply that condition over a range. Try this instead:

=SUMPRODUCT((Attendance!D6:D100=0)*(Violations!C6: C100="X"))

this checks the ranges from rows 6 to 100 and counts if the criteria
are met.

Hope this helps.

Pete

On Jan 18, 4:58 pm, PatrickP
wrote:
I type in the following formula and keep getting the error message that it is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. However, I have added them everywhere I can think of it is
still getting rejected. BTW, what I am trying to tell Excel is "If there is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default "add parenthesis"

You're welcome, Patrick - thanks for feeding back.

Pete

On Jan 18, 11:05*pm, PatrickP
wrote:
Pete:

With a minor modification regarding the range, that seems to have done the
trick. *Thank you so much!



"Pete_UK" wrote:
You can't use COUNTIF like that - it only works with one condition,
and you normally apply that condition over a range. Try this instead:


=SUMPRODUCT((Attendance!D6:D100=0)*(Violations!C6: C100="X"))


this checks the ranges from rows 6 to 100 and counts if the criteria
are met.


Hope this helps.


Pete


On Jan 18, 4:58 pm, PatrickP
wrote:
I type in the following formula and keep getting the error message that it is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. *However, *I have added them everywhere I can think of it is
still getting rejected. *BTW, what I am trying to tell Excel is "If there is
a 0 in one cell AND an X in another cell, count it."


=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")


What am I mising?- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default "add parenthesis"

A right parenthesis. Regardless of the formula as to wether or not it makes
sense, look at your formula, you see two left parentheses and only one right
parenthesis. Parentheses must be balanced. The number of left parentheses
must be matched by an equal number of right parentheses. The innermost
parentheses say "Do me first" then go to the next higher level. All
functions must have a left and right parenthesis. Thus AND requires the two
and so does COUNTIF.

Tyro

"PatrickP" wrote in message
...
I type in the following formula and keep getting the error message that it
is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. However, I have added them everywhere I can think of it is
still getting rejected. BTW, what I am trying to tell Excel is "If there
is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default "add parenthesis"

Regardless of the problem with your formula, look at it! You have two (2)
left parentheses and one (1) right parenthesis. Parentheses must be
balanced, an equal number of left and right parentheses.

Tyro

"PatrickP" wrote in message
...
I type in the following formula and keep getting the error message that it
is
missing a parenthesis. No error message when using the "pop up" window to
assist with the formula but when I hit "enter" I get the parenthesis
notification. However, I have added them everywhere I can think of it is
still getting rejected. BTW, what I am trying to tell Excel is "If there
is
a 0 in one cell AND an X in another cell, count it."

=COUNTIF(AND(Attendance!D6=0,Violations!C6="X")

What am I mising?



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
Negative Percentage in Parenthesis instead of with "-" sign silversun62280 Excel Discussion (Misc queries) 4 April 4th 23 10:17 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 09:59 AM.

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

About Us

"It's about Microsoft Excel"