Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2011, 08:49 AM
Lucky Lucky is offline Conditional formatting with AND, OR Windows XP Conditional formatting with AND, OR Office 2007
Novice
Conditional formatting with AND, OR
 
Join Date: Oct 2011
Posts: 2
Lucky is on a distinguished road
Question Conditional formatting with AND, OR

Hi All,
I need to add conditional formatting on a cell.
A requirement is: if the cell should be highlighted yellow if value contains letters A, F, or T.

I’m trying to use “Format only cells that contain” -> Cell value -> Equal to -> AND (“A”, “F”, “T”), but looks the excel takes it literally ="AND(""A"", ""B"", ""C"")"

What would you recommend?
Reply With Quote
  #2  
Old 10-03-2011, 04:33 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Conditional formatting with AND, OR Windows 7 32bit Conditional formatting with AND, OR Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

Here's one way.

In the name manager (on the formulas tab), define a name called Letters which refers to this:
={"A","F","T"}

Then, in the conditional formatting, create a new rule which uses a formula to determine which cells to format as this:
=OR(ISNUMBER(FIND(Letters,A1)))

Where A1 is the subject cell.


This will be case sensitive. If you don't want it to be case sensitive then use the SEARCH() function instead of FIND().
Reply With Quote
  #3  
Old 10-03-2011, 11:41 PM
Lucky Lucky is offline Conditional formatting with AND, OR Windows XP Conditional formatting with AND, OR Office 2007
Novice
Conditional formatting with AND, OR
 
Join Date: Oct 2011
Posts: 2
Lucky is on a distinguished road
Question

Thanks Colin,
It works


I'm going to use this rule for a range of cell $A$2:$E$10, where $A$1:$E$3 is a header row.
I assigned the formula =OR(ISNUMBER(FIND(Letters,A1))) to the range - and it's working. I don't understand that. FIND(find text1, within text2) - the function returns position number of text2 in text1. My A1 contains some text without T, F, A, and when I enter a, f, or t in $A$2:$E$10 I'm getting formated text.
Attached Files
File Type: xlsx Book1-ConditionalFormating.xlsx (9.8 KB, 13 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting namedujour Excel 3 08-25-2011 01:46 PM
Conditional formatting with AND, OR help with conditional formatting Snvlsfoal Excel 3 07-03-2011 11:55 PM
Conditional formatting with AND, OR * Conditional Formatting MS 2010 djreyrey Excel 3 06-03-2011 01:54 AM
Conditional formatting of Today +21 days? SHERMAN Excel 3 12-20-2010 08:08 AM
Challenge!! Need help though. (Conditional formatting) knuckles70 Excel 2 02-05-2010 12:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft