0
votes

Tutorial -- MS EXCEL – How to Construct Your Own Custom-Made Calculator (and perhaps sell it too?)

posted March 21, 2007 - 10:30am
Tutorial -- MS EXCEL – How to Construct Your Own Custom-Made Calculator (and perhaps sell it too?)

Microsoft Excel has a very powerful VBA (Visual Basic for Application) programming engine underneath its innocuous-looking hood. People have written volumes and volumes about all the wonderful things you can do with Excel, especially if you are dealing with any kind of numbers.

Here is a tutorial on how to construct your own calculator, ANY CALCULATOR you need, especially if you cannot find it on the Internet.

The other day while I was working on a project, the need arose to convert millimeters into inches, but expressed with 1/32nd fractions instead of decimals.

For example I needed to end up with a number that looked like 1 16/32” instead of 1.5”. Of course the more odd the faction is (say, 1 13/32”) the more involved the conversion gets.

I searched the Internet to find a ready-made calculator that would accomplish that but I couldn’t find any. So I sat down and constructed one myself. And here is how you can do it too easily if you follow these steps…

A MS EXCEL Millimeters-to-Inches with 1/32 fractions CONVERSION CALCULATOR:

Launch a new worksheet in Excel.

Reserve your A1 cell as the INPUT cell. This is where you will type in your millimeters and hit ENTER to get the inches and fractions. (You can actually reserve ANY cell you want but I chose A1 for the sake of simplicity.)

Select cell B1. In the INPUT BAR above the spreadsheet, type in the following formula for B1 and then hit Enter or click the green check mark to save it:

= A1/0.7938

Since 1/32nd of an inch is actually 0.7938 mm, we are finding how many 1/32nds are there within our A1 number.

Select cell C1. In the INPUT BAR above the spreadsheet, type in the following formula for C1 and then hit Enter or click the green check mark to save it:

=B1/32

This calculates the inch equivalent in still a decimal format, like 7.8934”

Now we need to separate the WHOLE NUMBER part of this number and calculate the NUMERATOR (the top of a fraction) of the final number. We already know the DENOMINATOR (the bottom of a faction) and it is 32 by default. We do not need to calculate that.

Select cell D1. In the INPUT BAR above the spreadsheet, type in the following formula for D1 and then hit Enter or click the green check mark to save it:

=INT(C1)

This separates the integer whole number part of your inch figure. But now we also need to find out the NUMERATOR.

Select cell E1. In the INPUT BAR above the spreadsheet, type in the following formula for E1 and then hit Enter or click the green check mark to save it:

=C1-D1

This gives the numerator in inches expressed in decimal format. We have to translate this into the 1/32 format.

Select cell F1. In the INPUT BAR above the spreadsheet, type in the following formula for F1 and then hit Enter or click the green check mark to save it:

=E1/0.03125

This yields the number 1/32nds, with some extra decimal points. We need to round it up to the nearest integer.

Select cell G1. In the INPUT BAR above the spreadsheet, type in the following formula for G1 and then hit Enter or click the green check mark to save it:

=ROUNDUP(F1,0)

There you have it!

You can color the cells A1, D1, and G1 with different colors for quick readout of the numbers that really matter.

Let’s test our calculator…

Enter 300 (mm) into A1 and press ENTER and here is what you get:

11 for D1 and 26 for G1.

So 300 millimeters is 11 26/32” … or if you would like to simplify it further, you can also express it as 11 6/8”

Neat eh, especially if you have a hundred such numbers to convert? Once you have this calculator, just enter the number in A1 and press Enter, and repeat as many times as you want ?

If your calculator is unique enough, I bet you can even market your calculator as well to like minded people working on similar projects.

How about a TREE NITROGEN CONTENT calculator to calculate the nitrogen content in fallen trees, indexed to their cross-section diameter and number of rings, for example?

Or how about an EVACUATION CALCULATOR to calculate the time it would take to evacuate a building depending on variables such as square feet of total stair space, number of floors, number of people working in the building, time of the day, severity of alarm, etc.?

Your imagination is your only limit to the crazy number of very useful calculators you can set up wit MS Excel.

Go out, invent a brand new calculator today and enjoy yourself!



Comments

Post new comment

  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • Allowed HTML tags: <p> <br> <b> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <span> <object> <param> <embed> <table> <tr> <td> <div>
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Join Xomba Today

Do you like to write? Would you like to make a little extra money on the side? These people do. Join the Xomba community today.
Become a Member