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 Count in two columns

I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 266
Default Count in two columns

skrev i en meddelelse
oups.com...
I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u


One way:

=COUNTA(A2:B20)-SUMPRODUCT((A1:A20<"")*(B1:B20<""))


--
Best regards
Leo Heuser

Followup to newsgroup only please.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count in two columns

=SUMPRODUCT(--((A1:A10<"")+(B1:B10<"")0))

Biff

wrote in message
oups.com...
I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count in two columns

=SUM(IF((A4:A7<"")+(B4:B7<""),1))

ctrl+shift+enter

" wrote:

I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Count in two columns

Maybe this?:

=SUMPRODUCT(--(LEN(A4:A7&B4:B7)0))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default Count in two columns

hi J.F

if u are aware of using an array formula by pressing ctrl-shft-enter
then you may also consider the sum array function...

=SUM(--((A1:A10<"")+(B1:B10<"")0))

regards
--
*****
birds of the same feather flock together..



" wrote:

I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count in two columns

I've seen several references to 'ctrl-shft-enter' in these postings,
but I don't know about it. Thanks to all who responded! JF

On Feb 3, 9:18 am, driller wrote:
hi J.F

if u are aware of using an array formula by pressing ctrl-shft-enter
then you may also consider the sum array function...

=SUM(--((A1:A10<"")+(B1:B10<"")0))

regards
--
*****
birds of the same feather flock together..

" wrote:
I want to count non-blank cells in two columns, but count only one of
them if both are non-blank.
The following example would yield 4
4 t
3
5 y
u



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 Count 2 Columns rileym Excel Worksheet Functions 1 August 23rd 06 03:54 AM
Pivot Table - How do I count number of columns? vicky Excel Discussion (Misc queries) 5 August 8th 06 01:26 PM
how to count one value or another across multiple columns? MeatLightning Excel Discussion (Misc queries) 10 May 22nd 05 09:23 AM
If two columns match then count one. How? Tried countif and sum . IMC Medrec Excel Worksheet Functions 1 February 14th 05 12:28 PM
count number of cells based on TWO conditions (2 different columns Troi-Xanh Excel Worksheet Functions 2 February 12th 05 12:46 AM


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

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"