If you are more-than-average well-versed in Excel, this problem may interest you.

Attached is a very small (less than 0.5%) sample of my Library Index file. Note that it is a macro-enabled *.xlsm file, and it does contain a macro which despite Microsoft's nanny assertions probably won't set your computer on fire.

My Library Index is a heavily conditionally-formatted list of all my electronic books, both audio books and ebooks. My current project with this list is to add plot synopses to all of the ebooks; the audio books already have them, as do the ebooks that are duplicates of the audio books where I was able to just copy those synopses over from the audio books.

The synopses are entered as Comments to the book title cells. These cells are formatted by default in tiny little boxes, using a font called "Tahoma" in eight-point bold type. These settings are totally unsuitable for what I am doing, and the defaults cannot be changed. So, rather than go through nearly 7,000 comments one at a time and change the typeface, the size of the box and the size of the type I have an Excel VBA macro that does it globally for me in a single pass.

Actually, there are two macros, one for fixing the type, one for fixing the box size. For the purpose of this exercise, only the second one is included here, and that is the one that is causing the difficulty.

I didn't write this macro, I found it on the internet after literally hours of searching. I understand it (there is only one line of it that isn't obvious in function) and am completely baffled about why it doesn't work properly. What is the problem with it?

For most of the cells it works pretty much correctly. For many of the cells it puts excess blank space below the text in the Comment box, sometimes more blank space than the text itself takes up. For a very few cells it truncates the text in the Comment box.

I won't bore you with all the dead-end troubleshooting I have done on this, except to suggest that it might somehow be related to the actual text of the comment, and that once a Comment box size has been established for a cell, it stays established regardless of future efforts.

If anybody is knowledgeable and brave enough to take a look at this, I would very much enjoy hearing from you. Should you decide to play with this, note that the macro works only on selected (i.e., highlighted) cells.

tanstaafl.

Addendum 1: In a previous Excel-oriented thread, there was discussion of the much-despised "Ribbon" interface and its deficiencies. I have found that this ribbon is very configurable. You can add new tabs, you can move operations from one tab to another, you can delete entire groups (for example, I have gotten rid of that horrid "Styles" group that used to take up about a third of the ribbon, and added a "Quick Print" icon) and like many before me have discovered that once you've spent five or 10 hours learning the new interface, you'll never want to go back to the old one.

Addendum 2: As RobotCaleb suggested, Amazon.com is a good source of synopses. Probably 60-70% of my ebooks have Amazon book descriptions. With my programmable keyboard, if Amazon has the description I can put it into my Library index with three mouse "operations" (two drag-to-highlight and one left-click) plus three keystrokes, takes less than 10 seconds.

db


Attachments
AllBooks Macro Workfile.xlsm (104 downloads)
Description: Library Index sample with VBA macro (Excel .XLSM file)


_________________________
"There Ain't No Such Thing As A Free Lunch"