Categories
RSS Feed
Search NewtonExcelBach
Archives
Top Posts
- Using LINEST for non-linear curve fitting
- XLDennis, the MSDN Library, and VBA rant
- Cubic Splines
- Daily Download 4: Continuous Beam Analysis
- Filling Blanks with Go To-Special (and local help rant)
- 3DFrame Ver 1.03 and Frame4 Ver 3.07
- Daily Download 5: Frame Analysis
- About Newton Excel Bach
- Downloads
- Writing Arrays to the worksheet - VBA function
Recent Comments
Category Archives: UDFs
Section Properties UDF and UDF charting
The technique for calculating section properties from coordinates is conveniently coded into a UDF: Function Area(xy_range As Variant) As Double Dim XYcells As Variant Dim N As Long, NumX As Long Dim XD As Double, YSum As Double XYcells = … Continue reading
Posted in Arrays, Charts, Excel, UDFs
Tagged Section Properties; Area; First Moment of Area; Second
6 Comments
Ranges and Arrays – 2
Yesterday we looked at how to get data from a worksheet range into a VBA array. Today’s post looks at the opposite operation; writing an array to a worksheet range. With a UDF it couldn’t be simpler: Function MyFunction() as … Continue reading
Ranges and Arrays
Transferring data from a worksheet into a VBA routine, or the other way round, is one of the most frequent tasks carried out in VBA programming. Fortunately there is a simple way to do it: In a subroutine: Name the … Continue reading
Worksheetfunction vs UDF
The previous post provided VBA code for a number of trigonometric functions, most of which are already available in Excel. Why bother you may say, why not just use the WorksheetFunction object? The numbers below provide the answer: Time to … Continue reading
Trigonometric Functions in VBA
Deep within the bowels of the Microsoft on-line help can be found: http://msdn2.microsoft.com/en-us/library/csfk8t62(VS.85).aspx which lists the derivation of trigonometric functions not provided by VBA. Not included in this list is ATan2(), which is strange because this is the one trigonometric … Continue reading