Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Excel 2013 formula doesn't seem to be working

Posted on 2015-01-12
7
Medium Priority
?
35 Views
Last Modified: 2016-06-10
Driving me nuts

Please look at attched sheet and tell me why ;
eg

           A                                            B                              C
1    Bag male female          =trim(clean(a1)             =Right(b1,6)      C1 shows------      emale  (no "f")
8    Bow tie male                =trim(clean(a8)              =Right(b8,6)       C8 shows ------       male    (1st is blank)TestMF.xlsx
0
Comment
Question by:lifeactuary
  • 4
6 Comments
 

Author Comment

by:lifeactuary
ID: 40545535
Wht's wrong??????
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40545551
Your text probably has a space after it.

Clean ONLY removes non printable chars.  Space is printable. Use trim instead.
0
 

Author Comment

by:lifeactuary
ID: 40545606
Whew! Finally got it!

For some reason the spaces are showing as char(160).

But why didn't TRIM take care of that?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 

Author Comment

by:lifeactuary
ID: 40545677
But I used Trim(Char...)

Could you make the correction and send it to me?

I tried using SUBSTITUTE(CHAR(32)," ") and SUBSTITUTE(CHAR(160)," ") but still having a problem.

Tnanks
0
 
LVL 1

Accepted Solution

by:
Thymos68 earned 2000 total points
ID: 40550462
Char(160) is a non-breaking space, so it's treated as a character, and not something TRIM or CLEAN will remove.

Try including a substitution of the non-breaking space (ascii 0160), with a regular space (ascii 0032)

in B1, enter the following  =CLEAN(TRIM(SUBSTITUTE(A1," "," ")))
but be sure to key-in the ascii char 160 by pressing alt-0160 for the first space, then a normal space for the second

Good luck
0
 

Author Comment

by:lifeactuary
ID: 40551019
Thanks for the reply.

I found a solution by copying the column containing  the problem field into a new worksheet, doing a Text-to-Column, and then combing the result into a single cell with a space between each word,

Wonder why CLEAN doesn't remove CHAR(160)?

Thanks again.
Ed
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Viewers will learn the basics of using filtering and sorting in Excel 2013.
Viewers will learn how to find and create templates in Excel 2013.

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question