Hi Everyone,
The mystery today is: Why does a TRIM formula work sometimes and not others? I attached a spreadsheet if anyone wants to look at it if they're bored with tough questions.
Hi Everyone,
The mystery today is: Why does a TRIM formula work sometimes and not others? I attached a spreadsheet if anyone wants to look at it if they're bored with tough questions.
If your data has come from the web it could include CHAR(160) which looks like a space.
TRIM does not remove this character.
You'll prob have to put the result in a SUBSTITUTE(A1,CHAR(160),"") or similar
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
E16 is a number
D16, ie TRIM(E16) is text
You need to convert to numbers by using
TRIM(E16)+0
Do this and they'll all show up
I changed column A and Column D to "Text" format and hey presto, it returns the Description.
It's probably because Excel tries to work out if something is a number if you just have General format so it perhaps couldn't make the match.
Give it a try on your version and post again if you found other instances.
Excel is a constant learning process and it's great to help each other. If I've helped you today, a click on the star on the left is appreciated.
SpecialK is right about the numbers, but some of your codes are combinations of letters and numbers so I guess you want them all as text.
Here's Microsoft's documentation for this issue: https://support.office.com/en-us/art...c-fe5303222c9d As mentioned above, the TRIM() and CLEAN() functions only remove certain subsets of the entire list of "non-printing" characters.
Originally Posted by shg
Your formula is unnecessarily long (too many sets of parentheses) and can be done like this instead:
=IFERROR(IF(A6<1,"",INDEX($G$5:$G$25,MATCH(A6,$D$5:$D$25,0))),"No Definition")
I can't see what the problem is, but it clearly doesn't like the result of the TRIM formula. Perhaps if you create a macro to get the unwanted spaces out of the original item number column?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Try this work-around...
=IFERROR(IF(A5<1,"",INDEX($G$5:$G$25,IFERROR(MATCH(A5,$E$5:$E$25,0),MATCH("*"&A5&"*",$E$5:$E$25,0))))," No Definition")
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Glad that worked for you and thanks for the feedback
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks