Simpson’s Donkey

Simpson and his Donkey.

John Simpson Kirkpatrick

Posted in Bach | Tagged , , , | 2 Comments

Smart Indenter and Excel 2013

I have recently installed Office 365 on a new computer running Windows 8.1 (actually the third one in just over a month, but that’s another story).  Office 2013 has several annoying features, but for me the most annoying was that the VBA smart indenter add-in from Office Automation did not work.  The web-site only mentions Excel versions up to 2003, but it was working with no problems with Office 365 and Excel 2013 on my last Windows 7 computer, and a search suggests that it should work with Windows 8 and 32 bit versions of Office 2013, but on my machine it doesn’t.

My solution to this problem was to install the alternative smart indenter from Andrew Engwirda.  This works on my system with no problems (after reading the installation instructions, you need to enable “Trust access to the VBA project object model” ), and will also work with 64 bit versions of Office.

If anyone else has had a problem with the original code indenter and 32 bit Office, I’d be glad to hear from you, especially if you found a way to make it work, but in the meantime Andrew’s alternative code works just fine.

Posted in Computing - general, Excel, VBA | Tagged , , , , , | 26 Comments

Finding Excel Version Information

The information below was buried in an old post, but I had trouble finding it when I wanted it, so here it is in its own post:

Finding the version information in Office used to be easy; it was always under Help-About, but Microsoft has apparently decided that this information might frighten the uninformed, so they have decided to hide it:

  • In Excel 2010 it is under File-Help
  • In Excel 2013 it is under File-Account-About Excel
Posted in Computing - general, Excel | Tagged , , | 1 Comment

Numerical Integration; Tanh-Sinh Quadrature v. 4.3

A new version (4.3) of the numerical integration spreadsheet by Graeme Dennes is now available for download from Tanh_Sinh Quadrature.

The Tanh-Sinh Quadrature Version 4.3 workbook now provides a feature for the integration of integrands contained in independent (external) UDFs. By using this feature, changes to the workbook VBA programs are not required, providing a simplification of the use of the workbook. Although the performance shown by this method is not as great as that shown by the VBA-stored method, it is faster than the cell-stored method, and adds to the utility and functionality of the workbook without requiring VBA changes to be made by the user. All 13 quadrature programs can utilise this new feature. Added examples and documentation for using this new feature have been included on the T-S EXAMPLES worksheet. This feature was proposed by Doug Jenkins.

Also included in this release is the ability to evaluate text as a formula, further adding to the functionality of the workbook. Also proposed by Doug.

My thanks to Doug for raising these changes to enhance the workbook.

Graeme Dennes

In addition to the main workbook, containing full documentation and numerous examples, two other workbooks are now included in the download zip file, to simplify the process of using these functions in other applications:

  • Tanh-Sinh Quadrature v4.3 by Graeme Dennes-Code Only.xlsm: includes full open-source VBA code, but documentation is reduced to 2 simple examples of each function.
  • Tanh-Sinh Quadrature v4.3 by Graeme Dennes-Minimal Code.xlsm: includes code for the Tanh-Sinh function only, with two examples of using this function to evaluate integrals required by other routines.

Either of the cut-down workbooks may be incorporated in other applications by either inserting new worksheets and VBA code as required, or by copying the VBA code modules to another application.  VBA modules may be copied between projects by opening both workbooks, then simply selecting the desired modules in the VBE Project Explorer window, and dragging them to the new project “Modules” folder.

Alternatively the workbooks may be saved as an add-in (open the Save-as window, then select “Excel add-in” (*.xlam)), so that all the functions will be available from any open workbook.

Posted in Excel, Maths, Newton, Numerical integration, UDFs, VBA | Tagged , , , , , , , , | 6 Comments

More from Martin Simpson

“Never any Good”

A beautiful song by Martin Simpson about his father, who he clearly did not see in the way the title might suggest:

Martin Simpson – Never Any Good Lyrics

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office,
Not hard enough for the hod.
You’d rather be riding your Norton
Or going fishing with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

When your grammar school days were over,
It was nineteen-seventeen,
And you did the right and proper thing.
You were just eighteen.
You were never mentioned in dispatches.
You never mentioned what you did or saw.
You were just another keen young man
In the mud and stink of war.

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office,
Not hard enough for the hod.
You’d rather be singing the Pirate King,
Or going fishing with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

You came home from the Great War
With the pips of a captain’s rank.
A German officer’s Luger,
And no money in the bank.
Your family sent you down in the coal mine
To learn to be captain there,
But you didn’t stand it very long.
You needed the light and the air.

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office,
Not hard enough for the hod.
You’d rather be watching performers fly
Or going fishing with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

When the second war came along,
You knew what should be done.
You would re-enlist to teach young men
The booby trap and the gun;
And they sent you home to Yorkshire,
With a crew and a Lewis gun,
So you could save your seaside town
From the bombers of the Hun.

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office,
Not hard enough for the hod.
You’d rather be finding the nightjar’s nest,
Going fishing with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

And when my mother came to your door,
With a baby in her arm,
Her big hurt boy only nine years old,
Trying to keep her from harm,
If you had been a practical man,
You would have been forewarned.
You would have seen that it never could work,
And I would have never been born.

There’s no proper work in your seaside town,
So you come here looking for a job.
You were storeman at the power station
Just before I came along.
Nobody talked about how you quit,
But I know that’s what you did.
My mother said you were a selfish man,
And I was your selfish kid.

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office,
Not hard enough for the hod;
And your Norton it was soon gone
Along with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

You showed me eyebright in the hedgerow,
Speedwell and travellers joy.
You showed me how to use my eyes When I was just a boy;
And you taught me how to love a song
And all you knew of nature’s ways:
The greatest gifts I have ever known,
And I use them every day.

You were never any good with money.
You couldn’t even hold a job,
Not steady enough for the office, maybe,
Not hard enough for the hod.
You’d rather be riding your Norton
Or going fishing with your split cane rod.
You were never any good with money.
You couldn’t even hold a job.

Posted in Bach | Tagged , | Leave a comment