Conditional formatting on cells that contain a line feed

photojon

New Member
Joined
Jul 14, 2007
Messages
27
Greetings,

I have a simple single worksheet that contains all text (no formulas, VBA, etc). I am trying to create a conditional format for cells that contain "Flex Wk (linefeed) 1" and am having issues. Here are the experiments I have tried. I am able to create conditional formatting for all the cells that contain the number "1". I am also able to conditional format cells that contain "Flex Wk". I have also tried just doing a simple "Find" which works on "Flex Wk" but not "Flex Wk 1". Visually I observe the linefeed between the "Wk" and the "1". My internet searches reference CHAR(10), CHAR(13), ctrl+j, ALT 0010, etc. I have tried inserting these between the "Wk" and "1" and not of the searches find the cells. I am using Excel 2016.

Thanks
Jon
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about something like
=A1="Flex Wk"&CHAR(10)&"1"
 
Upvote 0
Thanks for the quick reply. Can you provide a little background on the =A1= part? Is this part of the conditional formatting structure or what I should experiment on with a search? I tried doing a search on "Flex Wk"&CHAR(10)&"1" and that didn't work. thanks again.
 
Upvote 0
What is the range of cells that you want this to work on?
 
Upvote 0
In that case select those cells > Home Tab > Conditional Formatting > New rule > Use a formula > enter the formula I supplied > select a format > Ok.
You may need to add a space or two into the formula depending on what you exact values are.
 
Upvote 0
Thanks again for all the help. It still does not appear to be working. To test it I entered the following in a cell (within the working range) "Flex Wk <pressed alt enter> 1" (where the alt and enter is just the key strokes, not the actual text). It visually appears to match the other data in the sheet but wanted to try it on a cell whose contents I knew for certain. I tried your suggested formula padding a space before the "1" and also without a space before the "1". Any other suggestions? Thanks again
 
Upvote 0
Is there a space after the Wk & before the linefeed?
 
Upvote 0
Unfortunately not. I retyped my "sample entry" with no space after the "Wk", pressed alt-enter, and then typed "1" leaving no additional spaces (the only space is between Flex and Wk)
 
Upvote 0
Put the formula into a blank cell & point it at the cell with your sample value, does it show TRUE

Excel 2013/2016
AB
1Flex Wk 1TRUE
sheet1
Cell Formulas
RangeFormula
B1=A1="Flex Wk"&CHAR(10)&"1"
 
Upvote 0

Forum statistics

Threads
1,224,832
Messages
6,181,235
Members
453,026
Latest member
cknader

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
Back
Top