Text Tools The Anatomy of a Utility

In this section, I describe an Excel utility that I developed (and that is part of my Power Utility Pak add-in). The Text Tools utility enables the user to manipulate text in a selected range of cells. Specifically, this utility enables the user to do the following:

■ Change the case of the text (uppercase, lowercase, proper case, sentence case, or toggle case).

■ Add characters to the text (at the beginning, to the end, or at a specific character position).

■ Remove characters from the text (from the beginning, from the end, or from a specific position within the string).

■ Remove spaces from the text (either all spaces or excess spaces).

■ Delete characters from text (non-printing characters, alphabetic characters, non-numeric characters, non-alphabetic characters, or numeric characters).

Figure 16-1 shows the Text Tools Utility dialog box.

* V i

i> t ►

4

E

IAVXli 4CHJ5IGN PATTil tONIS

: i

■GJCRTHPUS P^-VCWUlhNICI' rtlUAV ».."V WUJ#<UA.A£MA!tt4 '.1 mUH. inm£M CDUKiatf? HAwpn IMHW HAJ. I*THE!X PAY

CAttOi P. MUCLLER f**L DQtMN

r«n r*ih Wf*r

u

13W4BUH jJ Kus-t—

cfcw

VHUAfli E. VNCU itFARCi-t.-SWISA*

f-1

UMAkl Mt-kSiu-fcCn ltW -hM2«h lWimuw. a.■ ■ rijio* a. tvmqui

WiMJtm' JUCfrCKY : i HCH 1. ■Tin S

u

»&KPlTi.&tjQn W£Hi!L¥ALAOtJ:

t^ihliwp v wivm iuwmljchnkjil

«.*t iaikvph* mhuhjitfltlmil >.IfiR:-. Hu'iT'-H Wfll.i.liN

UM&ipattiftwh ^iiaip&bijgki

ST

MHWUKC

MM MHIIACM IK Hi MfMMI i

\m

Figure 16-1: Use the Text Tools utility to change the case of selected text. CD-ROM

Figure 16-1: Use the Text Tools utility to change the case of selected text. CD-ROM

The Text Tools utility is available on the CD-ROM that accompanies this book. This is a standalone version of the tool that is included with the Power Utility Pak. The file, named ® text tools. xlam , is a standard

Excel add-in. When installed, it adds a new command to the Ribbon: Home Utilities Text Tools. The VBA project is not protected with a password, so you can examine the code to see how it works.

0 0

Responses

Post a comment