Conditional Formatting or Macro to format font

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
I have a column in a spreadsheet (Column F) for this example. And I want to conditionally format only a portion of the text inside this column based on if cell contains text "1069 - xxxxx" then to format only that text 1069 - up until the next semi colon (if possible...if not at least just the 1069 -.

I've tried using the conditional format feature; but that doesn't have a if cell "contains" ability.
Then I tried using the Find/Replace. But for some reason that formats the entire contents of the cell if it finds 1069 (example below shows how using find/replace changes all the font to red, when I am only wanting the 1069 - red.)
MDR Reportability Query.xls
FGHI
1ACTUAL_DEV_CODE_DESCENTRY_DATEACTUAL_DEVICE_CODE_LOCACTUAL_DEV_CLARIF
2X100-NoMalfunctionIdentified;X100-NoMalfunctionIdentified;1069-BreakageofDevice;X100-NoMalfunctionIdentified;X100-N/A;X100-N/A;1069-N/A;X100-N/A;X100-N/A;X100-N/A;1069-Handle;X100-N/A;
32203-Other(usewhenanothercodecannotbeidentified);X100-NoMalfunctionIdentified;1059-Bend;1069-BreakageofDevice;1339-Kink;2203-Other(usewhenanothercodecannotbeidentified);2203-N/A;X100-N/A;1059-N/A;1069-N/A;1339-Lumen;2203-N/A;2203-N/A;X100-N/A;1059-ProximalEnd;1069-Handle;1339-Shaft;2203-N/A;
092706
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

dcardno

Well-known Member
Joined
Nov 20, 2002
Messages
544
Office Version
  1. 2013
Platform
  1. Windows
Have a look at this thread. It isn't exactly on point, but it is close.

To apply multiple formats within a cell you have to change the format of the characters in the cell, not the cell altogether. In your case you would have to search for the required text string, as well as the next semi-colon, then use those values to determine the start position and length of the text for which you wish to change the format.

Let us know how it works out.
 

Forum statistics

Threads
1,141,720
Messages
5,708,078
Members
421,545
Latest member
TWR

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
Top