Nonbreaking spaces are the devil.

Jan 24, 2020 2:24 PM

dearbluey

Views

99408

Likes

2841

Dislikes

77

Nonbreaking spaces are the devil.

My job requires the use of excel, and I'd never used it before starting my position. As such, I'm entirely self taught, but only tend to learn the things I absolutely need in the moment to do my job. I decided to make the sheets more efficient and learned things like vlookup (and even got help from Reddit - bless them for helping me get the formula working right!) so that I could automate part of the sheets, effectively comparing two reports and returning a value if two names matched.

Except the names didn't match, even though they very clearly DID to my eyes.

Then I learned about the insidious and terrible creature known as the nonbreaking space. It looks like a regular space, but for some godforsaken reason it is not. One of the reports uses regular spaces. The other exports with nonbreaking spaces. Fine. No problem. Create vlookup function, and then create macro (also something I'd never done before) to remove all nonbreaking spaces so that the names do match.

Success!

Explain what I did to my supervisor, proud of learning of the existence of these wicked little secret nonbreaking spaces. Show my work, how it runs, look to supervisor to approval. Supervisor is all furrow-browed and says "You know there's an easier way, right?"

She points to the name cell It contains not only the name, but the employee ID on the end of it. She then shows me how to pull the employee ID out into a separate column. Then vlookup can just compare that instead of being all stroppy about different kinds of spaces.

Takes, like, 15 seconds. No macro needed. No need to worry about interdimensional demons posing as spaces.

I look very tired. My supervisor looks long-suffering. She knows that I'm learning excel on the fly, she's okay with that, but she also doesn't have the time to sit me down and explain in detail how the program works. I'm on my own to learn, and everyone is cool with that. Except the ways I learn things sometimes turn out to be convoluted and less efficient than I'm aiming for.

But I guess I learned more than one new thing, right?

Edit: Just catching up on all the comments and kind words. Thank you, everyone, for your affirmations. You're right. I learned and grew and can continue to do so. For those who offered tutorials and excel help, I greatly appreciate it. When questions arise, I know where to turn now. :)

memes

This was a triumph. I'm making a note here: "HUGE SUCCESS."

6 years ago | Likes 2 Dislikes 0

And don’t forget the True/False bit on the end. It will drive you bonkers if you aren’t aware of the difference.

6 years ago | Likes 16 Dislikes 0

You indeed learned many things today. Text normalization is thorny problem that will come up someday. PS. watch out for nonbreaking hyphens.

6 years ago | Likes 7 Dislikes 0

Success. You learned two things.

6 years ago | Likes 3 Dislikes 0

Once you get Excel down if you want to impress your boss learn Python and apply that to your Excel.

6 years ago | Likes 2 Dislikes 0

You learned a lot of things! You should be proud. There's a lot of ways to do things in excel you're solution just isn't the most efficient.

6 years ago | Likes 4 Dislikes 0

As a self-taught Excel pro, I applaud your tenacity. You learned so much on that one task that you're the real winner. Keep it up. You're...

6 years ago | Likes 8 Dislikes 0

...on the path to being an expert. (Suggestion to impress your boss: learn pivot tables)

6 years ago | Likes 4 Dislikes 0

I have something which produces similar data. I normally use 'trim(substitute(A1, char(160),char(32)))' and copy it all to another range.

6 years ago | Likes 10 Dislikes 0

Exactly what I was coming here to comment. But you don't even need to copy it to another range if it is the source value not lookup range

6 years ago | Likes 2 Dislikes 1

Same here. And I used google sheets a lot in my last job so I fudged in my interview and said I knew excel. Turns out they are NOT the same.

6 years ago | Likes 2 Dislikes 0

No problem here; Good job! Now take things to the next level with Index Match which is far superior to VLookUp

6 years ago | Likes 11 Dislikes 0

Or that new Xlookup thing which is being tested in the microsoft insider program. Combines h/vLookup with the known limitations.

6 years ago | Likes 1 Dislikes 0

It’s still a success! Excel is very open ended and there are many ways to solve any given problem.

6 years ago | Likes 3 Dislikes 0

Excel is a great program, I use it all of the time, but my headaches come from AutoCAD. The depth of nonsense to know about is immeasurable.

6 years ago | Likes 3 Dislikes 0

Regular spaces can be changed to new lines when rendered, nonbreaking spaces don't. The result is that fill justification will split two

6 years ago | Likes 8 Dislikes 0

Words separated by a regular space but never two separated by a nonbreaking space.

6 years ago | Likes 3 Dislikes 0

Excel, the cause of and solution to all of life's problems.

6 years ago | Likes 7 Dislikes 0

Index / match is your friend.

6 years ago | Likes 2 Dislikes 0

As a supervisor, say thanks and remember the trick. The only people that frustrate me are the ones who don't learn and improve

6 years ago | Likes 2 Dislikes 0

Hey, great job! You just learned two ways to do that!

6 years ago | Likes 3 Dislikes 0

Index and Match my friend! Better than Vlookup (in my opinion anyway)

6 years ago | Likes 3 Dislikes 0

I learn by making a thousand mistakes

6 years ago | Likes 3 Dislikes 0

If I was your supervisor, I would be pleased. Knowing that you're learning as you go and are still able to identify problems and (1/)

6 years ago | Likes 2 Dislikes 0

apply the knowledge you do have + know how to seek out additional information to solve that problem is a valuable & widely applicable skill.

6 years ago | Likes 1 Dislikes 0

=)

6 years ago | Likes 1 Dislikes 0

You proved that you can think of solutions on the fly with minimal experience. This is an asset in problem solving

6 years ago | Likes 2 Dislikes 0

i remember one time i got carried away an re-created ms project inside of ms excel...

6 years ago | Likes 3 Dislikes 0

Sounds like someone's company is using a spreadsheet to do a database's job

6 years ago | Likes 4 Dislikes 0

You're learning and trying to improve. The knowledge about nonbreaking spaces, vlookups and macros may not be useful now, but later on...

6 years ago | Likes 339 Dislikes 2

Not to mention, even putting in that effort probably puts you in the top 5% straight away.

6 years ago | Likes 2 Dislikes 0

... Later on when it becomes relevant the knowledge will long become forgotten (if they're anything like me)

6 years ago | Likes 1 Dislikes 0

This. A thousand times, this! I've been the go to guy for Excel, Word and PowerPoint help for so many years because I taught myself how to

6 years ago | Likes 19 Dislikes 0

Use them. Keep it up and you will be the same. The desire to figure it out on your own is what you need to learn. Just remember, there are

6 years ago | Likes 8 Dislikes 0

multiple ways to do something. Always keep your eyes open for easier ways to do what you need to do.

6 years ago | Likes 2 Dislikes 0

You should look at it as an accomplishment! You now know how to build a macro and do a Vlookup! I’m proud of you for the initiative!

6 years ago | Likes 2 Dislikes 0

Every problem usually has multiple solutions, some more efficient than others. You probably found a way will prove useful on another project

6 years ago | Likes 6 Dislikes 0

You learned how to do a macro and came up with a possible solution. You were halfway there with the vlookup. I'd say you did pretty good 1/

6 years ago | Likes 19 Dislikes 0

Seeing as you are new to using these elements of excel. Plus anything new you learn now will always be something you can use in the 2/

6 years ago | Likes 9 Dislikes 0

Future. As far as I can see, it's all positives 3/3

6 years ago | Likes 8 Dislikes 0

Pfft this was still a success. Next time you need to beat down   or do a Macro you're set. Doing things wrong is the best way to learn.

6 years ago | Likes 1055 Dislikes 4

This. A hundred times this. Index match and me are best buds because I had to do more than vlookup. It's a curve and sometimes hard.

6 years ago | Likes 1 Dislikes 0

As a programmer I can confirm this is very much true and pretty much my job. Do it wrong untill you find the right way XD

6 years ago | Likes 3 Dislikes 0

Avoid macros. Anything that can be done manually can be done with macros. Really not a practical solution unless you really learn vba.

6 years ago | Likes 3 Dislikes 1

Correction. Best way to learn is from other people’s mistakes. The second best way to learn is from your own

6 years ago | Likes 1 Dislikes 0

What they said

6 years ago | Likes 3 Dislikes 0

Not wrong, just different.

6 years ago | Likes 5 Dislikes 1

6 years ago | Likes 1 Dislikes 0

Double success. You got better at the old way and Learned a new way. Every learning is a success and a movement forward.

6 years ago | Likes 27 Dislikes 0

And a better boss would have known that and framed it that way.

6 years ago | Likes 100 Dislikes 3

...or better yet, laughed after saying it, said "Great work!", bought you coffee, and explained the easier way.

6 years ago | Likes 34 Dislikes 1

And seriously, learning Excel VBA is like discovering the Force. :)

6 years ago | Likes 24 Dislikes 2

Fuck, I thought I'd be fine writing VBA because I'd done VB before... Fuck was I wrong.

6 years ago | Likes 3 Dislikes 0

Or stick with me-what if you took a series formal courses which taught efficient complex problem solving and improved logical thinking?

6 years ago | Likes 5 Dislikes 0

Most efficient problem solving consists of doing the wrong things faster, or realizing multiple wrong things are isomorphic.

6 years ago | Likes 1 Dislikes 0

Being good at learning is mostly about iterating wrong things faster.

6 years ago | Likes 1 Dislikes 0

Understanding the structure of data is as important as the method to analyze; you learned about both. No failure there.

6 years ago | Likes 237 Dislikes 0

Maybe even more. We go by the 80/20 rule. 80% of your time understanding and cleaning your data, and 20% analysing it.

6 years ago | Likes 1 Dislikes 0

This. It may seem like you just spent all that time for nothing you’ve learned and improved your knowledge. You’ll apply this elsewhere

6 years ago | Likes 5 Dislikes 0

@op this here is important, you found a solution to a problem. Not the best solution however on the way you learned a lot be proud 1/

6 years ago | Likes 13 Dislikes 0

What you can take away from this, you now know what a vlookup is, and you are learning that data can correlate in many ways. 2/

6 years ago | Likes 8 Dislikes 0

Your solution was not wrong in any way. You simply saw the problem differently. And that is the best thing you learned here.

6 years ago | Likes 6 Dislikes 0

It frustrates me that yes Excel is great for some and most things but this reporting should be done on a DB level.

6 years ago | Likes 6 Dislikes 0

Right? Just because you can, doesn't mean you should!

6 years ago | Likes 4 Dislikes 1

Sql baby! Dump that stuff in markets as flat trimmed text and then query the shit out of that motherfucker!

6 years ago | Likes 5 Dislikes 0

I'll take any help anyone can give me with SQL... I just started self learning this week....

6 years ago | Likes 3 Dislikes 0

W3schools & stackoverflow learned me a lot.

6 years ago | Likes 1 Dislikes 0

Keep each query atomic, always test your query as a select statement, avoid using multiple views that contain references to the same tables,

6 years ago | Likes 1 Dislikes 0

Bigint is more efficient than guid as an index in the majority of cases, RBAR operations are bad, databases are optimized for sets.

6 years ago | Likes 1 Dislikes 0

Do not get me started on cursors,

6 years ago | Likes 0 Dislikes 0