#1   Report Post  
Posted to microsoft.public.excel.misc
ArthurN
 
Posts: n/a
Default Conditional counting

Hi,
sumif(range,criteria,sum_range) is a very nice function. Is there any way I
can achieve similar result with some count function, something like
countblank(range, on_condition, countblank_range)?
ArthurN

PS countif seems a bit limiting, or is it not?
  #2   Report Post  
Posted to microsoft.public.excel.misc
bigwheel
 
Posts: n/a
Default Conditional counting

Give us an idea of what you want to do. It may well be that a UDF could be
made to do it.

"ArthurN" wrote:

Hi,
sumif(range,criteria,sum_range) is a very nice function. Is there any way I
can achieve similar result with some count function, something like
countblank(range, on_condition, countblank_range)?
ArthurN

PS countif seems a bit limiting, or is it not?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Conditional counting

=sumproduct() sounds like something you should look into:

=sumproduct(--(a1:a10="criteria"),--(b1:b10=""))

Adjust the range, but don't use the whole column.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

ArthurN wrote:

Hi,
sumif(range,criteria,sum_range) is a very nice function. Is there any way I
can achieve similar result with some count function, something like
countblank(range, on_condition, countblank_range)?
ArthurN

PS countif seems a bit limiting, or is it not?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Conditional counting

ps. Debra Dalgleish has lots of notes for counting/summing:
http://contextures.com/xlFunctions01.html
http://contextures.com/xlFunctions04.html

ArthurN wrote:

Hi,
sumif(range,criteria,sum_range) is a very nice function. Is there any way I
can achieve similar result with some count function, something like
countblank(range, on_condition, countblank_range)?
ArthurN

PS countif seems a bit limiting, or is it not?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
ArthurN
 
Posts: n/a
Default Conditional counting

I wouldn't like to work with the numbers. I would like to find the number of
blank cells, say in column B, where the corresponding cell (row) in column A
wouldn't be empty:
A B
01/13 56
01/14
01/15 43
I can't use countblank(range) because I don't know the range, I know it
starts at b2, I don't yet know where it ends




  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Conditional counting

=SUMPRODUCT(--(A2:A65536<""),--(B2:B65536=""))

But I think I would be more conservative and just use a row that I know won't be
exceeded.

If you expect 2000 entries, then make it 4000.

ArthurN wrote:

I wouldn't like to work with the numbers. I would like to find the number of
blank cells, say in column B, where the corresponding cell (row) in column A
wouldn't be empty:
A B
01/13 56
01/14
01/15 43
I can't use countblank(range) because I don't know the range, I know it
starts at b2, I don't yet know where it ends


--

Dave Peterson
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
conditional counting with Excel LeicaElmar Excel Worksheet Functions 1 October 17th 05 10:23 PM
conditional counting of autolist cells/rows johli Excel Discussion (Misc queries) 0 September 23rd 05 01:45 PM
Counting the number of cells meeting conditional formating criteria Jeff Excel Worksheet Functions 4 July 9th 05 01:18 AM
conditional counting jim314 Excel Discussion (Misc queries) 5 June 22nd 05 12:36 AM
counting cells with conditional formatting applied HalB Excel Discussion (Misc queries) 3 February 21st 05 01:21 PM


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