Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Ignoring Cells with Only Spaces

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Ignoring Cells with Only Spaces

=COUNTIF(A1:A100,"* ")


"Heliocracy" wrote:

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Ignoring Cells with Only Spaces

That appears to do the opposite of what I'm asking.

If cell A1=" ", COUNTIF(A1,"* ") returns a 1. I need a formula to return a
zero if there are only spaces in cell A1.

Thanks.

"Heliocracy" wrote:

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Ignoring Cells with Only Spaces

Try something like this:

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

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

XL2002, WinXP


"Heliocracy" wrote:

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Ignoring Cells with Only Spaces

Yes, that does appear to do it. Thanks.

"Ron Coderre" wrote:

Try something like this:

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

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

XL2002, WinXP


"Heliocracy" wrote:

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Ignoring Cells with Only Spaces

I'm glad that worked for you....and thanks for the feedback.

***********
Regards,
Ron

XL2002, WinXP


"Heliocracy" wrote:

Yes, that does appear to do it. Thanks.

"Ron Coderre" wrote:

Try something like this:

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

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

XL2002, WinXP


"Heliocracy" wrote:

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy

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
Ignoring Formulas within cells jimswinder Excel Worksheet Functions 8 July 21st 06 02:52 PM
Ignoring Blank Cells Reefaman Excel Worksheet Functions 2 June 11th 06 05:43 PM
Ignoring highlighted cells frustrated Excel Worksheet Functions 14 December 15th 05 09:02 AM
Ignoring zero cells in IF statements ~Andy~ Excel Worksheet Functions 5 November 29th 05 02:20 PM
Ignoring empty cells beeo Excel Discussion (Misc queries) 3 September 8th 05 09:57 AM


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