Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Countif to use like sumif

Hi all,

Need some help with this problem that has been bugging me.

I have the following data

ColA ColB ColC
1999 100 150
1999 0 75
2000 150 200
2001 200 250
2001 0 100
2001 0 100

I need to look down column A and return the number of data points 0
(Count) in column B & C i.e.

1999 1 2
2000 1 1
2001 1 3

If countif worked like sumif I would do something like
countif(ColA,"2001",ColB)=1, countif(ColA,"2001",ColC)=3.

Unfortunately countif does not work like this so I need another way to get a
formula to count the number of data points in the columns B&C that meet the
conditions in column A.

Could I program a similar function in VBA.

Any help will be seriously appreciated.

Thanks
Pantelis




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Countif to use like sumif

Panetlis,

Use SUMPRODUCT to combine and find the count
using more than one criteria, in a way similar to this:

=SUMPRODUCT(N(A1:A6=1999),N(B1:B60))

Ture Magnusson
Karlstad, Sweden

"pantelis" wrote in message
...
Hi all,

Need some help with this problem that has been bugging me.

I have the following data

ColA ColB ColC
1999 100 150
1999 0 75
2000 150 200
2001 200 250
2001 0 100
2001 0 100

I need to look down column A and return the number of data points 0
(Count) in column B & C i.e.

1999 1 2
2000 1 1
2001 1 3

If countif worked like sumif I would do something like
countif(ColA,"2001",ColB)=1, countif(ColA,"2001",ColC)=3.

Unfortunately countif does not work like this so I need another way to get

a
formula to count the number of data points in the columns B&C that meet

the
conditions in column A.

Could I program a similar function in VBA.

Any help will be seriously appreciated.

Thanks
Pantelis






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Countif to use like sumif

Ture,

Thank you very much for that, works fine now.

Pantelis
"Ture Magnusson" <tureATturedataDOTse.nospam.please wrote in message
...
Panetlis,

Use SUMPRODUCT to combine and find the count
using more than one criteria, in a way similar to this:

=SUMPRODUCT(N(A1:A6=1999),N(B1:B60))

Ture Magnusson
Karlstad, Sweden

"pantelis" wrote in message
...
Hi all,

Need some help with this problem that has been bugging me.

I have the following data

ColA ColB ColC
1999 100 150
1999 0 75
2000 150 200
2001 200 250
2001 0 100
2001 0 100

I need to look down column A and return the number of data points 0
(Count) in column B & C i.e.

1999 1 2
2000 1 1
2001 1 3

If countif worked like sumif I would do something like
countif(ColA,"2001",ColB)=1, countif(ColA,"2001",ColC)=3.

Unfortunately countif does not work like this so I need another way to

get
a
formula to count the number of data points in the columns B&C that meet

the
conditions in column A.

Could I program a similar function in VBA.

Any help will be seriously appreciated.

Thanks
Pantelis








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Countif to use like sumif

You are welcome, Pantelis! I'm happy that I could help you.

--
Ture Magnusson
Microsoft MVP - Excel
Karlstad, Sweden

"pantelis" wrote in message
...
Ture,

Thank you very much for that, works fine now.

Pantelis
"Ture Magnusson" <tureATturedataDOTse.nospam.please wrote in message
...
Panetlis,

Use SUMPRODUCT to combine and find the count
using more than one criteria, in a way similar to this:

=SUMPRODUCT(N(A1:A6=1999),N(B1:B60))

Ture Magnusson
Karlstad, Sweden

"pantelis" wrote in message
...
Hi all,

Need some help with this problem that has been bugging me.

I have the following data

ColA ColB ColC
1999 100 150
1999 0 75
2000 150 200
2001 200 250
2001 0 100
2001 0 100

I need to look down column A and return the number of data points 0
(Count) in column B & C i.e.

1999 1 2
2000 1 1
2001 1 3

If countif worked like sumif I would do something like
countif(ColA,"2001",ColB)=1, countif(ColA,"2001",ColC)=3.

Unfortunately countif does not work like this so I need another way to

get
a
formula to count the number of data points in the columns B&C that

meet
the
conditions in column A.

Could I program a similar function in VBA.

Any help will be seriously appreciated.

Thanks
Pantelis










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
SUMIF or COUNTIF deletion files Excel Worksheet Functions 1 September 13th 09 04:18 PM
countif - sumif emmbee Excel Discussion (Misc queries) 1 August 18th 09 04:33 PM
COUNTIF?? SUMIF?? Vegs Excel Discussion (Misc queries) 1 December 19th 05 03:52 PM
SUMIF vs COUNTIF Kay Excel Discussion (Misc queries) 2 August 10th 05 01:29 PM
Countif, Sumif reno Excel Worksheet Functions 2 February 12th 05 02:31 AM


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