Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Sum / countif data range

Hi all,

I've data that I need to count if it's between a certain value

eg:

London,3
London,7
Rome,1
Rome,5
Rome,5

=SUM((B1:B10="London")*(A1:A106))
This is as an array

So the above would give an answer of London 1, however I would like to
use instead of 6 a range, eg 6 and < 10.
How would I do that?

Should I be using countif.

Thanks,

Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Sum / countif data range

=SUMPRODUCT(--(B1:B10="London"),--(A1:A106),--(A1:A10<10))


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ed Peters" wrote in message
...
Hi all,

I've data that I need to count if it's between a certain value

eg:

London,3
London,7
Rome,1
Rome,5
Rome,5

=SUM((B1:B10="London")*(A1:A106))
This is as an array

So the above would give an answer of London 1, however I would like to
use instead of 6 a range, eg 6 and < 10.
How would I do that?

Should I be using countif.

Thanks,

Ed



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Sum / countif data range

Hi,

Possibly

=SUM((B1:B10="London")*(A1:A106))-SUM((B1:B10="London")*(A1:A1010))

Mike

"Ed Peters" wrote:

Hi all,

I've data that I need to count if it's between a certain value

eg:

London,3
London,7
Rome,1
Rome,5
Rome,5

=SUM((B1:B10="London")*(A1:A106))
This is as an array

So the above would give an answer of London 1, however I would like to
use instead of 6 a range, eg 6 and < 10.
How would I do that?

Should I be using countif.

Thanks,

Ed

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
Countif(len(Range)4) Cortez Excel Discussion (Misc queries) 2 July 16th 07 10:07 PM
COUNTIF to compare one range versus another range Phil Excel Programming 3 May 30th 07 10:39 PM
countif using a range gerryR Excel Worksheet Functions 7 May 23rd 06 07:16 AM
Countif count items not in data range jbanton Excel Discussion (Misc queries) 1 May 16th 06 12:32 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


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