![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 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 |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Location: Phoenix, AZ, USA
Posts: 29
|
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 ] |
|
|
|
|
|
#3 | |
|
New Member
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 28
|
Quote:
|
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Here's what worked in a cell for me... you shoud be able to modify it for a conditional format as well
[i]=IF(AND(COUNTBLANK(A1)=0,LEN(A1)>0),"true","False")[i] 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 ] |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
Just playing around and this seems to work for text, but not for numbers.
=NOT(ISERROR(SEARCH(" ",A4))) HTH |
|
|
|
|
|
#6 |
|
New Member
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 28
|
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" ?? |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
This in "conditional Formating" worked for me, for finding any blank spaces within a string , in A1.
=FIND(" ",A1,1) |
|
|
|
|
|
#8 |
|
New Member
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 28
|
Nimrod,
Thank you very much. It worked great!! =FIND(" ",A1,1) |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Cheers
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|