ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional formating based on text (https://www.excelbanter.com/excel-worksheet-functions/70437-conditional-formating-based-text.html)

mango7

Conditional formating based on text
 

I want to make all cells which contain a question mark to have a red
fill but the conditional formating options don't allow you to make an
"if a cell contains ? then" format.


--
mango7
------------------------------------------------------------------------
mango7's Profile: http://www.excelforum.com/member.php...o&userid=29529
View this thread: http://www.excelforum.com/showthread...hreadid=510245


SteveG

Conditional formating based on text
 

Starting in the first cell of your range (in this case A5),
FormatConditional formatting. Change the CF option from Cell Value is
to Formula is.

=FIND("?",A5,1)0

Select Format, Patterns, Red. Click OK, and OK again. Use the format
painter to apply to all cells in your range.

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=510245


Bob Tarburton

Conditional formating based on text
 
for cell A1 in conditional formatting enter the following function
=ISNA(FIND("?",A1,1))=FALSE
probably a simpler formula on the way too.

"mango7" wrote in
message ...

I want to make all cells which contain a question mark to have a red
fill but the conditional formating options don't allow you to make an
"if a cell contains ? then" format.


--
mango7
------------------------------------------------------------------------
mango7's Profile:
http://www.excelforum.com/member.php...o&userid=29529
View this thread: http://www.excelforum.com/showthread...hreadid=510245




Bob Tarburton

Conditional formating based on text
 
Oops!
ISERROR instead of ISNA

"Bob Tarburton" wrote in message
...
for cell A1 in conditional formatting enter the following function
=ISNA(FIND("?",A1,1))=FALSE
probably a simpler formula on the way too.

"mango7" wrote in
message ...

I want to make all cells which contain a question mark to have a red
fill but the conditional formating options don't allow you to make an
"if a cell contains ? then" format.


--
mango7
------------------------------------------------------------------------
mango7's Profile:
http://www.excelforum.com/member.php...o&userid=29529
View this thread:
http://www.excelforum.com/showthread...hreadid=510245






mango7

Conditional formating based on text
 

Hi,
That has worked great thanks. I was trying to create a formula to do it
myself but couldn't work out the intricacies. You couldn't explain the
formula to me could you so I know what each bit is and can edit it and
learn to make my own.

=FIND("?",A5,1)0

I get the =find bit ok, and the open brackets defines what to be found.
By putting the ? in "" does that mean that any other text in the cell is
ignored and doesn't matter? Or are they just necessary whatever the
value being searched for is? I understand the next thing is where to
search, the current cell number. It's the rest I don't understand. Why
is the a comma and then 1? and why outside the brackets do you need
0?


Sorry about this. Thank you


--
mango7
------------------------------------------------------------------------
mango7's Profile: http://www.excelforum.com/member.php...o&userid=29529
View this thread: http://www.excelforum.com/showthread...hreadid=510245


mango7

Conditional formating based on text
 

Hi,
Someone else also replied and I did that but I tried yours as well and
it worked great thanks. I was trying to create a formula to do it
myself but couldn't work out the intricacies. You couldn't explain the
formula to me could you so I know what each bit is and can edit it and
learn to make my own could you?

=ISERROR(FIND("?",A1,1))=FALSE

I get the find bit ok, and the open brackets defines what to be found.
By putting the ? in "" does that mean that any other text in the cell
is ignored and doesn't matter? Or are they just necessary whatever the
value being searched for is? I understand the next thing is where to
search, the current cell number. It's the rest I don't understand. Why
is the a comma and then 1? and why outside the brackets do you need
=false?

Sorry about this. Thank you


--
mango7
------------------------------------------------------------------------
mango7's Profile: http://www.excelforum.com/member.php...o&userid=29529
View this thread: http://www.excelforum.com/showthread...hreadid=510245


SteveG

Conditional formating based on text
 

Well you could actually use

=FIND("?",C7)

The text needs to be in " " to define it as text.

The other info was me including all the parameters of the FIND function
and then thinking that the CF would need to analyze the return of the
function, which by trial and error I discovered it did not as the above
proves.

This is what the FIND does.

=FIND(text,withintext,starting number)

so =FIND("?",A5,1) = Find the text ? within the text in cell A5
starting with the first character in the text string. If it is not
found then it would return an error.


Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=510245



All times are GMT +1. The time now is 01:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com