Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I use to be able to do this but now seems like i forgot
I want sum up values based on words in a column. For example in a column I want to aassign a value of 1 for every word in the column that has Kentucky This is the equation that used ot work for excel {=SUM((D6:D67="Kentucky")*(1))+SUM((D6:D67="Washin gton")*(1))} however when i try to modify the equation or click on ti it becomes =SUM((D6:D67="Kentucky")*(1))+SUM((D6:D67="Washing ton")*(1)) and i get this error #VALUE! Where does the { } come from and how to correct the problem. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi!
If you only want to count one criteria: =COUNTIF(D6:D67,"Kentucky") If you want to count more than one criteria, try one of these: =COUNTIF(D6:D67,"Kentucky")+COUNTIF(D6:D67,"Washin gton") =SUMPRODUCT((D6:D67="Kentucky")+(D6:D67="Washingto n")) =SUMPRODUCT(--(ISNUMBER(MATCH(D6:D67,{"Kentucky","Washington"},0 )))) Better to use cells to hold the criteria: A1 = Kentucky A2 = Washington Then: =COUNTIF(D6:D67,A1) =COUNTIF(D6:D67,A1)+COUNTIF(D6:D67,A2) =SUMPRODUCT((D6:D67=A1)+(D6:D67=A2)) =SUMPRODUCT(--(ISNUMBER(MATCH(D6:D67,A1:A2,0)))) {=SUM((D6:D67="Kentucky")*(1))+SUM((D6:D67="Washin gton")*(1))} Where does the { } come from and how to correct the problem. The braces mean that the formula is an array formula. Excel places them around the formula when you enter the formula. Instead of just hitting the ENTER key like you normally would, you need to use a sequence of key strokes. That key sequence is CTRL,SHIFT,ENTER. Hold down both the CTRL key and the SHIFT key then hit ENTER. You can't just type these braces in, you MUST use the key sequence. Also, when you edit an array formula it must be re-entered as an array using the key sequence. For the task that you're doing you don't need an array formula. Use one of the examples I've posted above. Biff wrote in message ups.com... I use to be able to do this but now seems like i forgot I want sum up values based on words in a column. For example in a column I want to aassign a value of 1 for every word in the column that has Kentucky This is the equation that used ot work for excel {=SUM((D6:D67="Kentucky")*(1))+SUM((D6:D67="Washin gton")*(1))} however when i try to modify the equation or click on ti it becomes =SUM((D6:D67="Kentucky")*(1))+SUM((D6:D67="Washing ton")*(1)) and i get this error #VALUE! Where does the { } come from and how to correct the problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
summing values appearing in col B when col A has been filtered | Excel Worksheet Functions | |||
Summing large columns | Excel Worksheet Functions | |||
Summing specific texts | Excel Discussion (Misc queries) | |||
Summing cells in pivot tables | Excel Discussion (Misc queries) | |||
Cumulative Summing | Excel Discussion (Misc queries) |