+ Reply to Thread
Results 1 to 4 of 4

Checking for just spaces

  1. #1
    Brad
    Guest

    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. #2
    Barb Reinhardt
    Guest

    RE: 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. #3
    Dave Peterson
    Guest

    Re: 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. #4
    Brad
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1