Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
"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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Negative Percentage in Parenthesis instead of with "-" sign | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |