Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default nested array formula's

Microsoft has an example of how to count how often multiple text values occur
by using the SUM and IF fuctions. The example formula is:
{=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1, 0))}
Copying and pasting the sample table and formulas work fine - since array
formulas I pressed F2 then Shift+Ctrl+Enter. Formula works. But if I type
in the exact formula (not copy & paste), it won't work. The F2 key does not
highlight it. The Evaluate Formula tool says my formula contains a constant
- but it is identical to the copied one that works. What am I doing wrong?
Thank you



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default nested array formula's

When you manually type in the formula are you typing the { } ?

Don't type the { }. Just type the formula:

=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1,0 ))

Then, instead of hitting the ENTER key use the key combination of
CTRL,SHIFT,ENTER. Excel will then add the braces { } automatically.

Another way to write that formula that does not require array entry (just
hit ENTER):

=COUNTIF(A2:A7,"Buchanan")+COUNTIF(A2:A7,"Dodswort h")

Biff

"Leoski" wrote in message
...
Microsoft has an example of how to count how often multiple text values
occur
by using the SUM and IF fuctions. The example formula is:
{=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1, 0))}
Copying and pasting the sample table and formulas work fine - since array
formulas I pressed F2 then Shift+Ctrl+Enter. Formula works. But if I
type
in the exact formula (not copy & paste), it won't work. The F2 key does
not
highlight it. The Evaluate Formula tool says my formula contains a
constant
- but it is identical to the copied one that works. What am I doing
wrong?
Thank you





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default nested array formula's

Thanks - that answer saved what hair I have left!

"T. Valko" wrote:

When you manually type in the formula are you typing the { } ?

Don't type the { }. Just type the formula:

=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1,0 ))

Then, instead of hitting the ENTER key use the key combination of
CTRL,SHIFT,ENTER. Excel will then add the braces { } automatically.

Another way to write that formula that does not require array entry (just
hit ENTER):

=COUNTIF(A2:A7,"Buchanan")+COUNTIF(A2:A7,"Dodswort h")

Biff

"Leoski" wrote in message
...
Microsoft has an example of how to count how often multiple text values
occur
by using the SUM and IF fuctions. The example formula is:
{=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1, 0))}
Copying and pasting the sample table and formulas work fine - since array
formulas I pressed F2 then Shift+Ctrl+Enter. Formula works. But if I
type
in the exact formula (not copy & paste), it won't work. The F2 key does
not
highlight it. The Evaluate Formula tool says my formula contains a
constant
- but it is identical to the copied one that works. What am I doing
wrong?
Thank you






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default nested array formula's

You're welcome.

Biff

"Leoski" wrote in message
...
Thanks - that answer saved what hair I have left!

"T. Valko" wrote:

When you manually type in the formula are you typing the { } ?

Don't type the { }. Just type the formula:

=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1,0 ))

Then, instead of hitting the ENTER key use the key combination of
CTRL,SHIFT,ENTER. Excel will then add the braces { } automatically.

Another way to write that formula that does not require array entry (just
hit ENTER):

=COUNTIF(A2:A7,"Buchanan")+COUNTIF(A2:A7,"Dodswort h")

Biff

"Leoski" wrote in message
...
Microsoft has an example of how to count how often multiple text values
occur
by using the SUM and IF fuctions. The example formula is:
{=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1, 0))}
Copying and pasting the sample table and formulas work fine - since
array
formulas I pressed F2 then Shift+Ctrl+Enter. Formula works. But if I
type
in the exact formula (not copy & paste), it won't work. The F2 key
does
not
highlight it. The Evaluate Formula tool says my formula contains a
constant
- but it is identical to the copied one that works. What am I doing
wrong?
Thank you








  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default nested array formula's

=SUM(COUNTIF(A2:A7,{"Buchanan","Dodsworth"}))
or
=SUMPRODUCT(--(A2:A7={"Buchanan","Dodsworth"}))


"Leoski" wrote:

Microsoft has an example of how to count how often multiple text values occur
by using the SUM and IF fuctions. The example formula is:
{=SUM(IF((A2:A7="Buchanan")+(A2:A7="Dodsworth"),1, 0))}
Copying and pasting the sample table and formulas work fine - since array
formulas I pressed F2 then Shift+Ctrl+Enter. Formula works. But if I type
in the exact formula (not copy & paste), it won't work. The F2 key does not
highlight it. The Evaluate Formula tool says my formula contains a constant
- but it is identical to the copied one that works. What am I doing wrong?
Thank you



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
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Nested array functions? John Beyer Excel Worksheet Functions 2 September 15th 06 05:35 AM
IF statement in Array Formula's sdg8481 Excel Discussion (Misc queries) 7 July 24th 06 12:49 PM
Nested if in Array TheLeafs Excel Worksheet Functions 2 March 28th 06 09:13 PM
How do I use wild cards in nested array formulas? hopeit Excel Worksheet Functions 7 August 16th 05 02:18 AM


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