Conditional formatting depending on sub string content i cell

Hi!

This has been eluded me all afternoon, I just want to mark out cells
in Excel that contains a specific sub string.

I have thousands of rows all containing small text strings. I would
like to mark the once containing one specific word with blue text, and
other cells containing another specific key word with a different
color.

Very simple, don't care about corner cases (containing several key
words etc.) Mostly I'm annoyed that I cannot solve this simple
problem. I just cannot get Excel to understand any of the formulas I
try in conditional formatting.

Can anyone hint me how to solve this? I would be most grateful!

(I run Excel 2003 by the way)

BR,
Andreas - Sweden
0
Andreas
11/18/2009 3:17:29 PM
excel 39879 articles. 2 followers. Follow

4 Replies
1285 Views

Similar Articles

[PageSpeed] 0

Highlight the cells you want this to apply to (assume that the first
cell in the highlighted range is A2), and click on Format |
Conditional formatting to bring up the CF dialogue box. In the first
box you should choose Formula Is rather than Cell Value Is and then
put this formula in the next box:

=3DISNUMBER(SEARCH("word",A2))

Click on the Format button, then on Colour, and choose your colour. OK
your way out.

Obviously, you should substitute your word or phrase in the formula
above - it will adjust automatically to the other cells in the range.

If you then want another condition you can bring up the CF dialogue
box again, click on Add and repeat for a different word or phrase and
with a different colour.

Hope this helps.

Pete

On Nov 18, 3:17=A0pm, Andreas Lundgren <d99...@efd.lth.se> wrote:
> Hi!
>
> This has been eluded me all afternoon, I just want to mark out cells
> in Excel that contains a specific sub string.
>
> I have thousands of rows all containing small text strings. I would
> like to mark the once containing one specific word with blue text, and
> other cells containing another specific key word with a different
> color.
>
> Very simple, don't care about corner cases (containing several key
> words etc.) Mostly I'm annoyed that I cannot solve this simple
> problem. I just cannot get Excel to understand any of the formulas I
> try in conditional formatting.
>
> Can anyone hint me how to solve this? I would be most grateful!
>
> (I run Excel 2003 by the way)
>
> BR,
> Andreas - Sweden

0
Pete_UK
11/18/2009 4:54:13 PM
Hi all, and thanks Pete!

It did help, ALMOST straight out-of-the-box...

I was playing around with FIND and other Excel commands yesterday, but
I constantly got "The formula you typed in contains an error" even
though I was just cut'n'paste from all kinds of tutorials. I got the
same error when trying your string!

BUT!
When I replaced the "," with a ";" it works!!!

In Nordic countries, we use "," as a decimal delimiter (instead of
".") I guess this must be the problem! I run an English language
Win2000, English Office but that did not matter. I did try to change
my regional settings in the Control Panel to use "." and not "," as
decimal delimiter, but it did not changed the fact that I needed ";"
and not "," in Excel. (I did not bather to reboot, maybe that is
needed to update the system.)

Even now, I cannot find anything about this in Excel help. For
example, SUM in the help section states the syntax as "SUM
(number1,number2, ...)".

(And for you all native English people I can tell you an other
interesting fact. Microsoft did actually translate all the Excel
commands to different languages. "SUM" for example is "SUMMA" in a
Swedish version of Excel. This makes it impossible to open documents
correctly that are created in an English version of Excel since the
keyword "SUM" is not recognized!)

Thanks a lot for the help,
Andreas - Sweden.


On 18 Nov, 17:54, Pete_UK <pashu...@auditel.net> wrote:
> Highlight the cells you want this to apply to (assume that the first
> cell in the highlighted range is A2), and click on Format |
> Conditional formatting to bring up the CF dialogue box. In the first
> box you should choose Formula Is rather than Cell Value Is and then
> put this formula in the next box:
>
> =3DISNUMBER(SEARCH("word",A2))
>
> Click on the Format button, then on Colour, and choose your colour. OK
> your way out.
>
> Obviously, you should substitute your word or phrase in the formula
> above - it will adjust automatically to the other cells in the range.
>
> If you then want another condition you can bring up the CF dialogue
> box again, click on Add and repeat for a different word or phrase and
> with a different colour.
>
> Hope this helps.
>
> Pete
>
> On Nov 18, 3:17=A0pm, Andreas Lundgren <d99...@efd.lth.se> wrote:
>
> > Hi!
>
> > This has been eluded me all afternoon, I just want to mark out cells
> > in Excel that contains a specific sub string.
>
> > I have thousands of rows all containing small text strings. I would
> > like to mark the once containing one specific word with blue text, and
> > other cells containing another specific key word with a different
> > color.
>
> > Very simple, don't care about corner cases (containing several key
> > words etc.) Mostly I'm annoyed that I cannot solve this simple
> > problem. I just cannot get Excel to understand any of the formulas I
> > try in conditional formatting.
>
> > Can anyone hint me how to solve this? I would be most grateful!
>
> > (I run Excel 2003 by the way)
>
> > BR,
> > Andreas - Sweden

0
Andreas
11/19/2009 7:02:47 AM
I've done some work in the past with a client with German and UK offices 
and come across similar problems with needing to use ; to separate 
arguments - it's really hard to retrain your muscle memory to do this 
fluidly though!
As for translating formulas I've never had a problem with that, saving 
in one version and re-opening in another. Maybe we had the MUI installed 
on some machines and that avoided the issue. Not sure why, but it 
certainly never caused a problem.
I could see that you might have problems if you had VBA which wrote 
formulas into cells for you, since there would be no conversion there.

Andreas Lundgren wrote:
> Hi all, and thanks Pete!
> 
> It did help, ALMOST straight out-of-the-box...
> 
> I was playing around with FIND and other Excel commands yesterday, but
> I constantly got "The formula you typed in contains an error" even
> though I was just cut'n'paste from all kinds of tutorials. I got the
> same error when trying your string!
> 
> BUT!
> When I replaced the "," with a ";" it works!!!
> 
> In Nordic countries, we use "," as a decimal delimiter (instead of
> ".") I guess this must be the problem! I run an English language
> Win2000, English Office but that did not matter. I did try to change
> my regional settings in the Control Panel to use "." and not "," as
> decimal delimiter, but it did not changed the fact that I needed ";"
> and not "," in Excel. (I did not bather to reboot, maybe that is
> needed to update the system.)
> 
> Even now, I cannot find anything about this in Excel help. For
> example, SUM in the help section states the syntax as "SUM
> (number1,number2, ...)".
> 
> (And for you all native English people I can tell you an other
> interesting fact. Microsoft did actually translate all the Excel
> commands to different languages. "SUM" for example is "SUMMA" in a
> Swedish version of Excel. This makes it impossible to open documents
> correctly that are created in an English version of Excel since the
> keyword "SUM" is not recognized!)
> 
> Thanks a lot for the help,
> Andreas - Sweden.
> 
> 
> On 18 Nov, 17:54, Pete_UK <pashu...@auditel.net> wrote:
>> Highlight the cells you want this to apply to (assume that the first
>> cell in the highlighted range is A2), and click on Format |
>> Conditional formatting to bring up the CF dialogue box. In the first
>> box you should choose Formula Is rather than Cell Value Is and then
>> put this formula in the next box:
>>
>> =ISNUMBER(SEARCH("word",A2))
>>
>> Click on the Format button, then on Colour, and choose your colour. OK
>> your way out.
>>
>> Obviously, you should substitute your word or phrase in the formula
>> above - it will adjust automatically to the other cells in the range.
>>
>> If you then want another condition you can bring up the CF dialogue
>> box again, click on Add and repeat for a different word or phrase and
>> with a different colour.
>>
>> Hope this helps.
>>
>> Pete
>>
>> On Nov 18, 3:17 pm, Andreas Lundgren <d99...@efd.lth.se> wrote:
>>
>>> Hi!
>>> This has been eluded me all afternoon, I just want to mark out cells
>>> in Excel that contains a specific sub string.
>>> I have thousands of rows all containing small text strings. I would
>>> like to mark the once containing one specific word with blue text, and
>>> other cells containing another specific key word with a different
>>> color.
>>> Very simple, don't care about corner cases (containing several key
>>> words etc.) Mostly I'm annoyed that I cannot solve this simple
>>> problem. I just cannot get Excel to understand any of the formulas I
>>> try in conditional formatting.
>>> Can anyone hint me how to solve this? I would be most grateful!
>>> (I run Excel 2003 by the way)
>>> BR,
>>> Andreas - Sweden
> 
0
AdamV
11/19/2009 7:20:06 AM
You're welcome, Andreas, and thanks for the feedback.

Pete

On Nov 19, 7:02=A0am, Andreas Lundgren <d99...@efd.lth.se> wrote:
> Hi all, and thanks Pete!
>
> It did help, ALMOST straight out-of-the-box...
>
> I was playing around with FIND and other Excel commands yesterday, but
> I constantly got "The formula you typed in contains an error" even
> though I was just cut'n'paste from all kinds of tutorials. I got the
> same error when trying your string!
>
> BUT!
> When I replaced the "," with a ";" it works!!!
>
> In Nordic countries, we use "," as a decimal delimiter (instead of
> ".") I guess this must be the problem! I run an English language
> Win2000, English Office but that did not matter. I did try to change
> my regional settings in the Control Panel to use "." and not "," as
> decimal delimiter, but it did not changed the fact that I needed ";"
> and not "," in Excel. (I did not bather to reboot, maybe that is
> needed to update the system.)
>
> Even now, I cannot find anything about this in Excel help. For
> example, SUM in the help section states the syntax as "SUM
> (number1,number2, ...)".
>
> (And for you all native English people I can tell you an other
> interesting fact. Microsoft did actually translate all the Excel
> commands to different languages. "SUM" for example is "SUMMA" in a
> Swedish version of Excel. This makes it impossible to open documents
> correctly that are created in an English version of Excel since the
> keyword "SUM" is not recognized!)
>
> Thanks a lot for the help,
> Andreas - Sweden.
>
> On 18 Nov, 17:54, Pete_UK <pashu...@auditel.net> wrote:
>
>
>
> > Highlight the cells you want this to apply to (assume that the first
> > cell in the highlighted range is A2), and click on Format |
> > Conditional formatting to bring up the CF dialogue box. In the first
> > box you should choose Formula Is rather than Cell Value Is and then
> > put this formula in the next box:
>
> > =3DISNUMBER(SEARCH("word",A2))
>
> > Click on the Format button, then on Colour, and choose your colour. OK
> > your way out.
>
> > Obviously, you should substitute your word or phrase in the formula
> > above - it will adjust automatically to the other cells in the range.
>
> > If you then want another condition you can bring up the CF dialogue
> > box again, click on Add and repeat for a different word or phrase and
> > with a different colour.
>
> > Hope this helps.
>
> > Pete
>
> > On Nov 18, 3:17=A0pm, Andreas Lundgren <d99...@efd.lth.se> wrote:
>
> > > Hi!
>
> > > This has been eluded me all afternoon, I just want to mark out cells
> > > in Excel that contains a specific sub string.
>
> > > I have thousands of rows all containing small text strings. I would
> > > like to mark the once containing one specific word with blue text, an=
d
> > > other cells containing another specific key word with a different
> > > color.
>
> > > Very simple, don't care about corner cases (containing several key
> > > words etc.) Mostly I'm annoyed that I cannot solve this simple
> > > problem. I just cannot get Excel to understand any of the formulas I
> > > try in conditional formatting.
>
> > > Can anyone hint me how to solve this? I would be most grateful!
>
> > > (I run Excel 2003 by the way)
>
> > > BR,
> > > Andreas - Sweden- Hide quoted text -
>
> - Show quoted text -

0
Pete_UK
11/19/2009 9:09:47 AM
Reply:

Similar Artilces:

Need to return "Blank" cell but NOT NA()
For my chart, I need to return the equivalent of a truly "blank" cell. The NA() function causes the graph to interpolate the missing point, whereas a blank cell causes the graph to plot nothing. I need to plot nothing. I'm using layered lines, one dashed and one solid, so that I can highlight interpolated points with a dashed style. Currently, I use a white line to mask the solid line that goes to "0" when the driving formula returns "" for the solid line. This works in 90% of situations, but there are some instances that are too complex (too man...

How to change cell color based on content
Hi, hope someone can help me. I don't use Excel much, but I'm creating a spreadsheet that keeps track of ticket sales for a charity I volunteer for. Anyway, what I want to do is to make the cells stand out for those that still owe money, either because a check is forthcoming or because they ordered by credit card. I want the credit card orders to show up with a different color (eg YELLOW) than those who are fully paid. I want the forthcoming check orders to show up in a different color (eg RED). So I have a column with payment type that is either Cash, Check, or Credit Card....

Strange sub-menu behaviour
Hi, I have a drop-down menu with submenus, the little arrow on the right handn side of the menu indicates the sub-menu. But when I click on the option to bring up the sub-menu the little arrow disappears. I have checked the properties but there are only about 5 and none relate to it. Any ideas? Does the sub menu display? Do you have any sub menu items defined. The arrow is displayed when the popup type is selected. Perhaps your sub menu is not defined or defined correctly? Tom "Chris Baker" <ChrisBaker@discussions.microsoft.com> wrote in message news:447C514B-2...

Today Conditional Format
I have a column which calculated a date based on 3 working days from a date input into a diff column. What I want to do I have the calculated date appear bold if that date has passed based on the current date. For example if I input 01/08/11 the next column calculates 04/08/11 (3 working days). I want the caluclated date to appear bold when I open the spreadsheet on the 05/08/11 ro show the calculated date has passed. I can use conditional formatting but can't get the syntax right Regards Andy Win XP Pro Office 2010 Andy Roberts presented the following explanation : > I ha...

Two Condition Vlookup?
I am currently trying to create a function that searches through an array for two exact column values which allows me to retrieve a third column value. For example: Type of Fruit Date Packaged Amount of Fruit Apples June 100 Oranges June 50 Apples July 75 Grapes July 50 In this example, I would be looking to retrieve the Amount of Fruit (Apples) that was packaged in July. I would be putt...

Can't format numbers for France in Excel 2003
I'm using the US version of Excel 2003, but need to format costs, etc., for a project in the French euro format (e.g., I need 2050.45 euros to display as 2 050,45). That currency format isn't offered in my dialog box, and if I make a custom number format that will display correctly, it doesn't operate as a number. Any suggestions? On Wed, 10 Oct 2007 08:51:03 -0700, Mary Fran <MaryFran@discussions.microsoft.com> wrote: >I'm using the US version of Excel 2003, but need to format costs, etc., for a >project in the French euro format (e.g., I need 2050.45 euros...

Query condition by date range
I'm trying to create a query to base a report from. I need it to return records within a date range that needs to be specified, as in specifying the beginning date and having the current date as the end date. A field is included in the query that has listed dates in the format mm/dd/yyyy. How would I write the criteria? I have part of it ready - [Please enter starting date:] . I know that's how you get the little question window. On Tue, 4 Dec 2007 14:51:00 -0800, silva wrote: > I'm trying to create a query to base a report from. I need it to return > records within a...

Need help with conditional formula (Excel 97)
Can anyone give me the correct syntax for the following formula: if A1 is blank, and B1 is more than zero, then display B1, otherwise display nothing (blank cell) Thank you JD =IF(AND(A1="",B1>0),B1,"") Success! -- met vriendelijke groetjes "Jake D" <JakeD@djhtend.com> schreef in bericht news:crkto4lv30u7uujv27ek8okr0us5t9oj10@4ax.com... > Can anyone give me the correct syntax for the following formula: > > if A1 is blank, and B1 is more than zero, then display B1, otherwise > display nothing (blank cell) > > Thank you > > ...

Inserting a cell in the header.
We are trying to get a cell in the header of a sheet. Can this be done? Example would be in our sheet in D9 is TFF. We want whatever is in D9 to go in the header. I'm not sure this makes sense. Thanks Wendy You could do this with a macro linked to the worksheet_change event. Insert the following code into the macro sheet for the sheet with the cell if interest. Private Sub Worksheet_Change(ByVal Target As Range) For Each Cell In Target If Cell.Address = "$D$9" Then ActiveSheet.PageSetup.CenterHeader = Cell.Value End If Next Cell End Sub -- mrice Research Scientist with ...

Format cells #7
I have Excel 2000, Win ME. Recently the pulldown command to format cells does not always respond - ie, no box appears, so I can't apply borders or control number format. The shortcut approach doesn't work either. I've tried Help..Detect and Repair but the fault remains. Any suggestions welcome. ...

Conditional formatting if condition of an if statement is true and a string value is displayed
Dear Experts: I got a nested 'IF'-Formula in an excel cell that returns nothing if the condition is false. I would like to conditionally format this cell with grey shading if the condition is true and a string value is displayed. How can this be achieved using excel conditional formating functionality ? Help is much appreciated. Thank you very much in advance. Regards, Andreas Let's say your doing this conditional formatting in cell K17. In conditional formatting (xl2003) choose the FormulaIs: option and enter: =$K$17<>"" choose your formatt...

Excel cell value equals selected text from Word
Is it possible to bookmark or link a piece of text in Microsoft Word eg. a title in the word document is 'West Belfast Profile' In Excel, I would like to make a cell value equal to the text from Word. Basically cell A5 in excel equals 'West' from the title 'West Belfast Profile' in Word. If the user changes the title in Word to 'East Belfast Profile', the cell value in Excel changes to 'East'. Is this possible? You go to Word document and copy the text you want to link to Excel, select the cell you want to paste to Excel file, right-click ...

Formatting worksheet
I have a workbook with three worksheets and one chartsheet in it. I have notes documenting various aspects of the four sheets. Some of those notes are on electronic post-it notes and others on scraps of paper. It seems to me that a convenient way to consolidate all of my documentation for the workbook would be to add another worksheet to it and put the information in it. What would be the best way to format the worksheet so that I could type information into it as if I were using a text editor? Leslie, Excel isn't really all that set up for text. I sometimes make narrow column...

Conditional Field in Queries
Is there a way to make a field in a query conditional so that it only displays the value if the value is equal to something specifically set? Thanks. Nick Nick.Korynski@gmail.com wrote: > Is there a way to make a field in a query conditional so that it only > displays the value if the value is equal to something specifically > set? Thanks. > > Nick Explain "the value is equal to something specifically set". -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com ...

Combobox value populate cell selection
I am looking for button code to have a selected cell range merged and populated with value chosen from combobox. This value is centered in the merged cell selection. The cells range is defined manually with mouse. Bart Have a look at this event code which you can refine. No error-checking for data in the selected range...........assumes the mergerange is empty when selected. Runs when a value is selected from Combobox1 Private Sub ComboBox1_Change() Set srng = Application.InputBox(prompt:= _ "Select A Range", Type:=8) With srng .HorizontalAlignment = xlCen...

zip codes not being saved as text in CSV format
I need my file to be saved in CSV format (to import into another application). When I format the zip codes as Text or Special(zip code), they are correct in XLS format, but when I open the file in CSV format they switch back to general. Any solution? work around? Thanks so much for your help in advance!! Melissa Change the file extension to .txt and use the text import wizard to treat the column as text (last dialog) -- Regards, Tom Ogilvy "MelissaM" <MelissaM@discussions.microsoft.com> wrote in message news:B5A02627-810E-4234-8247-267D9B12FA29@microsoft.com... >...

format a column
I have a simple question to ask, I have a column in Excel is number like 142000, I want to format the whole column numbers without the two ending 0s, change 142000 to 1420, how can I do that? Thanks -- xcao ------------------------------------------------------------------------ xcao's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14538 View this thread: http://www.excelforum.com/showthread.php?threadid=471821 Enter 100 in an empty cell and copy it. Then, select your range of numbers you want to change, Right Click and go to Paste Special, and select Div...

concatenating mismatched wide strings
When attempting to assemble a string, I am getting the error "concatenating mismatched wide strings". What would be the proper form for putting the string together and displaying it as a message? I don't understand where the mismatch is. CString s; . . . s = _T("shape"); . . . AfxMessageBox(_T("A picture file by the name of """) + s + _T(""" seems to be missing. \n We will now close the program, so that someone can reinstall the program.") ); The error message should include a line number. It seems like that ...

How do i use Conditional formatting for 3+ conditions ?
I have a text box in a report which highlights in colour current members in a list of past and present member names. I have six types of current members that I want to highlight, but with conditional formatting I can only use 3 conditions in the members [Type] field. I have tried [Type]="Full member" Or "Life member" but the "Or" doesn't work ! Is there a way to do this ? thanks .. Roger CF is limited to 3 contitions, but you can use OR in those expressions. If you set Condition1 to Expression, you can use: ([Type] = "Full member") Or (...

How to return a 12 hour time format without the AM in an Access query
The format function acts differently in a query and after hours of testing, messing, and cursing, I give up. How do you return 12 hour format without the AM or PM from an Access query. In my table, I've defined the Start Time and End Time to use "Medium Time" format and it works if and ONLY if you simple include the field in the query. However, if you use the field in a more complex statement, it returns leading zeros and trailing seconds. Here's what I've tried.... 'This didn't work because it returns trailing seconds and AM/PM. '2:00:00 PM...

Need Formula To Find Blank and NonBlank Cells
I have a worksheet with 6 columns (by Month) Sep Aug Jul Jun May Apr I have to review starting for example with May, I need to find any cell in May range that is null <> where Jun and Apr both are not null <> So if May is null and Jun and Apr are not null than I would count that as 1. If May is null and either Jun or Apr are null then I would not count them. =SUMPRODUCT(N(E2:E100=""),N(D2:D100<>""),N(F2:F100<>"")) "hilltop55" <hilltop55@discussions.microsoft.com> wrote in message news:08D989CB-D1B4-49F...

Help with Conditional formatting with Dates
Hi there, I have a spreadsheet in which I have to monitor various dates which are in different columns (i.e. (1) Date Tender Released, (2) Date Company Selected, (3) Date Draft Contract Forwarded, (4) Date Contract Signed etc...). Would if be possible to Conditional Format and have diffirent ROWs highlighted for each individual Contracts (I have 300 running contracts running) every time a date is filled in these different columns: Initial Step (1) = Yellow (Call for Tender released) Step (2) = Blue (Company Selected) Step (3) = Brown (Contract under Process) Step (4) = Green (Contract Si...

Conditional null value
Wondering if anyone can suggest a way to simplify the following code, which I’m using in the OnFormat event of a report. If Not IsNull(DLookup("[ICD2]", "EntryICDs", "[EntryNum] = " & Me! [PtAcct#])) Then Me![Field192] = Replace(DLookup("[ICD2]", "EntryICDs", "[EntryNum] = " & Me![PtAcct#]), ".", " ") End If If Not IsNull(DLookup("[ICD3]", "EntryICDs", "[EntryNum] = " & Me! [PtAcct#])) Then Me![Field194] = Replace(DLookup("[ICD...

Display ALL text contents in cell
I am having trouble displaying all the contents in the cell. It is som lengthy information in the cell. I have made the row height as high a it will go, but it still won't display all the information. I canno make the column width any wider than I have it set, because then th other columns will not fit on the page. Does anyone know how t overcome this problem? : -- Flipper106 ----------------------------------------------------------------------- Flipper1067's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2561 View this thread: http://www.excelforum.com/...

Help
Forgive me if "Conditional Sums" is not the accurate word for what I am trying to accomplish... I'm at a loss for what to call this situation. What I have is a spreadsheet totaling attendance figures for classes taught by two people (Dave and Cary). Column A lists their name, and next to it in Column B is the number of people who attended that class. What I need is a formula that will look at the sheet and report in a given cell the total for attendance for each person. I can work basic formulas like SUM, but that will give the total for the entire column, when what I n...