Require help with TRIM function

shahs

New Member
Joined
Oct 4, 2006
Messages
1
I have already an argument in conditional formatting which is

Formula is =LEN(C13)>64

This is to alert the user that they have exceeded the 64 char limit, but I now need to add to this argument to include the TRIM function, the TRIM function should alert when there are spaces before or after the text.

What I need to know is how do I combine the LEN and TRIM statment in one conditional statement. I only have two condition formatting options and the other one is used, hence why I need to combine the two statements in to one argument.

Thanks.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
=OR(LEN(C13)>64,LEN(TRIM(C13))<>LEN(C13))

edit: forgot to put Len() function around Trim() function.
 
Upvote 0
Hi

Try:

Code:
=OR(LEN(C13)>64,LEN(TRIM(C13))<LEN(C13))

This isn't perfect, as if your user has intentionally inserted a double space within whatever text he's written, TRIM will highlight this as a problem.

Best regards

Richard
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

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