#1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default summing texts

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   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default summing texts

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
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
summing values appearing in col B when col A has been filtered choc_penguin Excel Worksheet Functions 3 February 3rd 06 11:18 AM
Summing large columns Muttley Excel Worksheet Functions 1 October 27th 05 02:20 PM
Summing specific texts LostLady Excel Discussion (Misc queries) 3 June 9th 05 06:10 PM
Summing cells in pivot tables Ted Excel Discussion (Misc queries) 1 April 5th 05 05:10 PM
Cumulative Summing Carpie Excel Discussion (Misc queries) 3 February 11th 05 04:35 PM


All times are GMT +1. The time now is 05:25 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"