Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Andrew
 
Posts: n/a
Default Counting nonblank and non white space cells

I have a user who wants a simple count of nonblank cells. But he wants the
count to skip cells that have a space (or two or more) in them as well. My
formula is

=COUNTA(G91:OFFSET(G118,-2,0))

I can't seem to apply trim in there anywhere. How can I give him what he
has requested?
Thanks.

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=SUMPRODUCT(--(LEN(A1:A5)0),--(ISERROR(FIND(CHAR
(32),A1:A5))))

This will count all non-blank cells that do not have *ANY*
spaces, char(32), in them.

Biff

-----Original Message-----
I have a user who wants a simple count of nonblank

cells. But he wants the
count to skip cells that have a space (or two or more) in

them as well. My
formula is

=COUNTA(G91:OFFSET(G118,-2,0))

I can't seem to apply trim in there anywhere. How can I

give him what he
has requested?
Thanks.

.

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

B1:

=COUNTIF(A1:A10,"?*")+COUNT(A1:A10)

C1:

=B1-(B1-SUMPRODUCT(--(LEN(TRIM(A1:A10))0)))

C1 is the result cell.

Andrew wrote:
I have a user who wants a simple count of nonblank cells. But he wants the
count to skip cells that have a space (or two or more) in them as well. My
formula is

=COUNTA(G91:OFFSET(G118,-2,0))

I can't seem to apply trim in there anywhere. How can I give him what he
has requested?
Thanks.

  #4   Report Post  
Ken Wright
 
Posts: n/a
Default

=SUMPRODUCT(--(TRIM(A6:L26)<""))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Andrew" wrote in message
...
I have a user who wants a simple count of nonblank cells. But he wants

the
count to skip cells that have a space (or two or more) in them as well.

My
formula is

=COUNTA(G91:OFFSET(G118,-2,0))

I can't seem to apply trim in there anywhere. How can I give him what he
has requested?
Thanks.



  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

That's all what is asked... <g

Ken Wright wrote:
=SUMPRODUCT(--(TRIM(A6:L26)<""))



  #6   Report Post  
Ken Wright
 
Posts: n/a
Default

LOL - That was my first thought, but I must have reread that question half a
dozen times before posting just because you had posted something different.
<vbg

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Aladin Akyurek" wrote in message
...
That's all what is asked... <g

Ken Wright wrote:
=SUMPRODUCT(--(TRIM(A6:L26)<""))



  #7   Report Post  
Andrew
 
Posts: n/a
Default

Thanks. It works!

"Ken Wright" wrote:

LOL - That was my first thought, but I must have reread that question half a
dozen times before posting just because you had posted something different.
<vbg

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Aladin Akyurek" wrote in message
...
That's all what is asked... <g

Ken Wright wrote:
=SUMPRODUCT(--(TRIM(A6:L26)<""))




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



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