PC Review


Reply
Thread Tools Rate Thread

And/Countif formula

 
 
=?Utf-8?B?bmlyMDIw?=
Guest
Posts: n/a
 
      11th Jan 2006
I have a range of data which looks like something like this:-

london -2
london -2
london -1
wales -2

I am trying to create a formula that counts the number of times the first
column contains -1 and the second column contains -2, so far I have come up
with the formula:-

=SUM(IF(AND($B$4:$B$11="london",$C$4:$C$11=-2),1,0))

But this only returns a value of 1, can you help?




 
Reply With Quote
 
 
 
 
Roger Govier
Guest
Posts: n/a
 
      11th Jan 2006
Hi

This needs to be entered as an array formula so commit with
Ctrl+Shift+Enter.
Excel will include the curly braces { } when you do this. Do not type
them yourself.
{=SUM(IF(AND($B$4:$B$11="london",$C$4:$C$11=-2),1,0))}

for a non-array solution you could use
=SUMPRODUCT(--($B$4:$B$11="london"),--($C$4:$C$11=-2))


--
Regards

Roger Govier


"nir020" <(E-Mail Removed)> wrote in message
news:3A3F717E-FD4A-434B-AF05-(E-Mail Removed)...
>I have a range of data which looks like something like this:-
>
> london -2
> london -2
> london -1
> wales -2
>
> I am trying to create a formula that counts the number of times the
> first
> column contains -1 and the second column contains -2, so far I have
> come up
> with the formula:-
>
> =SUM(IF(AND($B$4:$B$11="london",$C$4:$C$11=-2),1,0))
>
> But this only returns a value of 1, can you help?
>
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF FORMULA ISSUES - NEED FORMULA CORRECTED Debbi Microsoft Excel Worksheet Functions 2 18th Nov 2009 04:47 AM
CountIF and Sum in one formula? Scott A Microsoft Excel Worksheet Functions 8 4th Jun 2009 07:51 AM
countif formula Paul E Microsoft Excel Worksheet Functions 4 5th Nov 2008 02:04 PM
CountIf formula results in the formula itself being displayed. =?Utf-8?B?TmV3S2lk?= Microsoft Excel Worksheet Functions 9 21st Dec 2005 11:10 PM
Countif formula Daniel Bonallack Microsoft Excel Worksheet Functions 3 16th Oct 2003 03:32 PM


Features
 

Advertising
 

Newsgroups
 


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