To transfer all of an array to an Excel range at once, see:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q177/9/91.asp&NoWebContent=1#kb1
Note limitations.
How about?
Function SigDigit(number, num_digits)
SigDigit = Application.Evaluate("ROUND(" & number & ",-(INT(LOG(ABS(" & number & "))+1-" & num_digits & ")))")
End Function
Moisture content in saturated steam is notoriously hard to measure reliabily in the power plant. To give you an idea of the extremes needed to measure it accurately, nuclear steam supplies (most of which are saturated) are sometimes tested by injecting radioactive tracers in the feedwater before...
The rotors of most synchronous generators are designed to operate in a relatively unchanging magnetic field. (i.e. it has one or more pairs of fixed north and south poles that spin synchronously within a similar set of magnetic fields spinning because of the current through the stator.)
If...
The goal of the "keepers" of electric grids is to keep the grid frequency fixed (usually at either 60Hz or 50Hz.) If the power generated is less than the power used, the grid frequency will drop (and vise versa.) Below are three ways that the grid system uses to maintain the frequency...
Use the Shell command to get the program going, then the SendKeys command to send the same keys you would press if you were running it yourself from your keyboard. It is kind of tricky if you need to send more than one set of keys. Unless you do something tricky, the VBA program will send keys...
The VBA listing below calculates some of the steam table functions using the 1967 ASME formulation. Note that it calculates in only one direction>> Pressure and Temperature (psia, degF) to the steam properties. It will not calculate "in the other direction." You must iterate (or use...
I need to calculate the radiant heat transfer from a small "dX by dX" plate with a temperature "T1" radiating into the mouth of a "L1" length of pipe of inside diameter "D". The end opposite the plate is blanked off with a flat surface. The top...
I have found that the best way to handle charting macros in Excel is not to. Maybe a little clarification is in order. What I mean is, using Excel (not VBA), chart some "dummy" data that has more data points than you expect your called-in data to be. (There's ways to dynamically...
If you can get your problem into Excel (the technical part of most VB programs paste into VBA very well) use Solver. It is a great linear or non-linear optimization routine. It can be programmed right into VBA. Search Google for "Creating Visual Basic Macros that Use Microsoft Excel...
Can anyone help with calculating the heat transfer method to be used for steam condensing on cold metal? (i.e. How do I calculate the heat transfer coefficient and what temperature do I use, the steam temperature or the saturated steam temperature?)
Update on using the "Worksheet_Change" event. Below I have corrected the sample program I submitted earlier. Note that I have added two lines. These are necessary to keep the program from initiating itself each time it changes the worksheet. (Without these changes, the program still...
You are certainly right. This stuff is great! Heres an example of how you can use it. We have spreadsheets that are used by Americans and Europeans and wanted them to be divided into an English unit side and a Metric unit side. (The actual calculations can be in the cells on either side.)...
I personally prefer the button method. Functions work great if the answer is only one number. I've tried making functions that return arrays, but I find them to be awkward and I don't usually want all of the answers to be output in a column.
Also, for the long engineering calculations I work...