Highlighting cell with space bar (blank) character

rlarson

New Member
Joined
Feb 25, 2002
Messages
28
Hi,

Does anyone know how I could use conditional formatting, or a formula, to look for a blank character in a cell, " ", and then highlight the cell or just the blank character?

Any help would be greatly appreciated.

R.Money
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Do you mean the cell is empty or has a space (" ") in it?

Or do you mean that you want to highlight the cell if it is empty or ANY spaces exist (i.e., would you highlight "Yum Pudding" because of the space or not?
This message was edited by PHMayfield on 2002-05-17 14:19
 
Upvote 0
On 2002-05-17 14:18, PHMayfield wrote:
Do you mean the cell is empty or has a space (" ") in it?

Or do you mean that you want to highlight the cell if it is empty or ANY spaces exist (i.e., would you highlight "Yum Pudding" because of the space or not?
This message was edited by PHMayfield on 2002-05-17 14:19

I would like to highlight the cell because there is an empty space between "Yum Pudding". Or, the highlight could apply to an empty space at the beginning or end of a text/numeric string. " 123abc1" or "cat ".
 
Upvote 0
Here's what worked in a cell for me... you shoud be able to modify it for a conditional format as well
=IF(AND(COUNTBLANK(A1)=0,LEN(A1)>0),"true","False")

Ooops since the posting you changed your request a little ... this only tests for cells that have "only" blank spaces not a mix of spaces and letters ...
This message was edited by Nimrod on 2002-05-17 14:26
 
Upvote 0
Just playing around and this seems to work for text, but not for numbers.

=NOT(ISERROR(SEARCH(" ",A4)))

HTH
 
Upvote 0
You're right. Maybe I should be looking for the "space bar" character in a cell by using a formula that tests for something like:
"If A1 contains " ", then highlight cell A1; if not, then do not highlight" ??
 
Upvote 0
This in "conditional Formating" worked for me, for finding any blank spaces within a string , in A1.
=FIND(" ",A1,1)
 
Upvote 0

Forum statistics

Threads
1,224,619
Messages
6,179,924
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top