Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Checking for just spaces

In conditionally formating I want to check if the cell has just spaces

I used the following logic

if the length of the cell is greater than zero (multiply) if the length of
the trimmed cell = 0. if both of these conditions are true - turn the cell
red - otherwise leave alone. This works - however is there an easier way to
do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Checking for just spaces

Try this is your conditional format

=AND(LEN(B15)0,LEN(TRIM(B15))=0)

I selected B15 and put a couple of spaces in it.


"Brad" wrote:

In conditionally formating I want to check if the cell has just spaces

I used the following logic

if the length of the cell is greater than zero (multiply) if the length of
the trimmed cell = 0. if both of these conditions are true - turn the cell
red - otherwise leave alone. This works - however is there an easier way to
do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Checking for just spaces

Or (dropping the len() bit):

=AND(LEN(B15)0,TRIM(B15)="")



Barb Reinhardt wrote:

Try this is your conditional format

=AND(LEN(B15)0,LEN(TRIM(B15))=0)

I selected B15 and put a couple of spaces in it.

"Brad" wrote:

In conditionally formating I want to check if the cell has just spaces

I used the following logic

if the length of the cell is greater than zero (multiply) if the length of
the trimmed cell = 0. if both of these conditions are true - turn the cell
red - otherwise leave alone. This works - however is there an easier way to
do this?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Checking for just spaces

Barb,

Thanks - That works and is essentially what I did - I compared the
=(AND(LEN(B15)0,LEN(TRIM(B15))=0)*1)=1 - your way is slightly easier.
However, is there an easier way of doing this??


"Barb Reinhardt" wrote:

Try this is your conditional format

=AND(LEN(B15)0,LEN(TRIM(B15))=0)

I selected B15 and put a couple of spaces in it.


"Brad" wrote:

In conditionally formating I want to check if the cell has just spaces

I used the following logic

if the length of the cell is greater than zero (multiply) if the length of
the trimmed cell = 0. if both of these conditions are true - turn the cell
red - otherwise leave alone. This works - however is there an easier way to
do this?

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
Remove trailing spaces from multiple columns in Excel dcaissie Excel Worksheet Functions 8 May 16th 08 08:21 PM
Deleting blank spaces in cells Mr Gow Excel Discussion (Misc queries) 4 May 17th 06 02:06 PM
Add spaces for specific fields to paste in Corey Excel Discussion (Misc queries) 3 December 30th 05 10:22 PM
how do I remove empty spaces trailing a text string? Need_Help Excel Worksheet Functions 2 June 7th 05 12:13 AM
Stripping out imbedded spaces in a cell/row Tom Excel Worksheet Functions 8 April 22nd 05 03:49 PM


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