October 02, 2008

Sorting mixed 5- and 9-digit zip codes in OpenOffice.org Calc or Microsoft Excel

Every advance leads to benefits and to problems.

The 9-digit zip code is great for delivery accuracy. But they aren't required. So you have mixed 5-digits and 9-digits.

Now just try sorting your address info by zip code when there's mixed 5s and 9s. Here's what you get when you sort a standard address list by zip code.  It's like cattle and sheep, they don't mix.

Zip1

What do you do?

There are three things you can do:
1 - Enforce a 9-digit zip. Everyone without four digits gets -0000 whether they want it or not.
2 - Put a ' in front of every zip code. It doesn't print but it forces the zip code to think of itself as text. (This also helps with not losing leading zeroes.)
3 - Split the column into two, so you have the zip in one column and the four-digit extension in the other. This is kind of like the forcing-9-digit solution.

The explanations follow but if you want to root around in an example spreadsheet, here's a spreadsheet with options 2 and 3.

Solution 1
Solution 1 is self-explanatory.

Solution 2
Just type a '   a regular apostrophe on the keyboard, to the left of the first character of every zip code. It doesn't show but it forces text format.

See? The ' is there in the entry field but it doesn't show in the spreadsheet cell.

Zip2

Typing ' into thousands of cells takes a while. So you can search and replace. There might be a better way to do this but this at least doesn't suck.

Click in the Zip Code heading in your spreadsheet, then  choose Edit > Find and Replace. Click More Options and fill out the window as shown, searching for ^0, caret zero, and replacing with '0, apostrophe zero.

You'll need to do this once for 0, then for 1, then for 2, and so on. (I've tried to figure out a faster way, plus submit any suggestions.) 

Zip3sr

Either replace one at a time if you're cautious, or go nuts and replace all. You might want to select the whole column of zip codes, too, and select the Current Selection Only checkbox.

When you're done, and when you sort that data, the zip codes sort correctly.

Zip4srresults

Solution 3

You can split your data into two cells with the LEFT and RIGHT functions. I'm throwing in IF too because sometimes you'll want the right-hand four digits (the extension) and sometimes you'll want 0000. (Or just leave it blank, whatever you want to do.)

This is what I want to achieve.

Zip5

And this is how I get it. The formula for the first column, where I extract the first five digits, is simple.

Zip6

The right-hand side is a little more complicated since you're dealing with variable-length zip codes. But basically you're saying if the zip code is just five digits, then create a new 4-digit extension, "-0000" (or just "0000" depending on how you want to deal with the dash). And then if it isn't just five digits, then you want to see the right-hand five digits of the zip code (including the dash) or the right-hand four digits (if you want to leave out the dash and put it in manually somehow).

Zip7

Then you just drag down those formulas to all the zip code cells.

If you want to turn those columns into normal text, just copy them, choose Edit > Paste Special, choose to NOT paste formulas, and click OK.
Zip8pastespecial

The pasted results are nothing but numbers.

Now when you sort, you just need to be sure to do it by two levels, first by the main zip code, then by the extension. BE SURE that you set the Ascending or Descending the same for both.
Zip9sort

And you get your results, sorted correctly.

Zip10

Here's a spreadsheet with options 2 and 3.

August 22, 2008

Persuading people that OpenOffice.org is the right choice? Accentuate the negative.

I blogged about this item recently.

http://openoffice.blogs.com/openoffice/2008/03/loss-aversion-a.html

It's about how people are more inclined to fear loss than to be motivated by gain. (And also about how a cheap placebo is less effective than an expensive placebo.)

That was pretty depressing because it seemed like people are hard-coded to not be interested in Openoffice.org (free, and gaining money in the budget to do other things with), when they could clearly benefit from switching from MS Office.

(Caveat. Of course, not everyone should switch from MS Office to OpenOffice.org, but pretty much everyone should consider it.)

However. I'm listening to NPR again and here's the flip side.

http://www.npr.org/templates/story/story.php?storyId=93872977

People are motivated by fear, by loss. Not just to buy a certain brand of deoderant but it just works. Firefighters who during training are shown  or told about the wrong decisions by previous firefighters, ended up performing better than firefighters who were just shown the right decision-making process. Mothers who were told that formula was bad for their babies were more likely to breastfeed than mothers who were told that breastfeeding was good for their babies.

Microsoft certainly does this but without as much emphasis on truth/the whole truth/and nothing but the truth as one might hope.

And when you think about it, it makes sense. Why bother to get up off the chair that's on fire if all you're told is that it's cooler over there on the other side of the room? "You're going to die" is the key information.

So that's one major thing. Emphasize the danger, the disadvantages, of the current choice.

The next major thing I took away from this NPR show is that it's all about "what is everyone else doing." Which is not surprising, but it's very effective. You know the sign you see in hotels, saying please leave your towel on the rack if you want to reuse it. The sign says we should save hot water, save the environment, etc.  Hotels in a study increased their towel reuse by guests significantly simply by changing the sign so that it says that 43% (or so) of hotel guests reuse their towels. People look to their peers for approval and guidance of what to do.

Here's a by no means complete but useful list of many implementations of OpenOffice.org. And let's not forget that Sun, Novell, and IBM all have heavy involvement with OpenOffice.org/StarOffice/Symphony.

http://wiki.services.openoffice.org/wiki/Major_OpenOffice.org_Deployments   Plus my home town library in Kalispell, Montana; the library uses Userful kiosks. Not a major deployment ;>  but it's another stat.

Once you've done the first two things, then of course you need reasons for switching to OpenOffice, or whatever you're trying to explain. And we have those in spades for OOo.

May 02, 2008

My article on transitioning to OpenOffice.org from Microsoft Office

I really thought that I had posted this article, but I have not seen it in a quick page through.

http://www.fanaticattack.com/2008/switching-office-suites-from-microsoft-office-to-openofficeorg.html

It is a big, big article with most of what I recommend about setting up and switching, with the primary focus on individual users. But it applies to transitioning groups, as well.

See also this blog post, which has some really specific info about how to distribute clip art to many users on a network.


Traininglogo




February 28, 2008

Sun Presentation Minimizer for OpenOffice or StarOffice

I came across this a few days ago on Lifehacker.

"Windows/Mac/Linux: With pictures, videos, and high-resolution fonts, slideshows can make up some pretty big files—fine if you've got a large enough thumb drive or CD-R, but what if you have to email them? Sun Presentation Manager, a free extension for OpenOffice, shrinks down files by compressing graphics, deleting hidden slides, and creating static versions of linked objects. It works similar to the PowerPoint-based PPTminimizer, but without the $40 fee and exclusive Office platform—you can use the extension on either OpenOffice files or imported PowerPoint projects. Sun Presentation Manager is a free download, and requires OpenOffice 2.3 or StarOffice 8 or later."

http://lifehacker.com/350774/shrink-powerpointopenoffice-slides-with-sun-presentation-minimizer


Traininglogo