Macros are files containing customized computer code that is incorporated into a spreadsheet application. Macros can be used to extend the functionality of a spreadsheet for custom applications.

There are two major spreadsheet applications in wide use: Microsoft Excel, and Open Office (Also called Libre Office under some linux operating systems). Both applications offer the same functionality and look very similar, but the programming language to create macros for the two are slightly different. So all macros on this site are divided into those for Excel or for Open Office.

# Microsoft Office Macros

## Interpolation Macros

Spreadsheets often have need to interpolate or extrapolate within a data set. These macros provide several functions with extensive support for all forms of interpolation and extrapolation of data tables. Includes the following functions.

- iePolate: Performs linear interpolation and exterpolation of a given data set.
- iPolate: Performs only linear interpolation of a given data set.
- ieSPolate: Performs 2nd order, non-linear interpolation and exterpolation of a given data set. Uses cubic splines.
- ie2DPolate: Performs interpolation across two independent variables in a data set.
- TabFind: Locates the address of a data table by matching the table name.

The download includes the following files.

- macro files for MS Excel (modInterpFunctionsRev2.0_MSExcel.bar)
- macro files for Open Office / Libre Office (modInterpFunctionsRev2.0_OpenCalc.bas)
- MS Excel spreadsheet demonstrating use of wave macros
- Open Office spreadsheet demonstrating use of wave macros

License: The macros are provided under the GNU Public license. A copy of the license is included in the download.

Download “Interpolation Macros” InterpFunctions.zip – Downloaded 113 times – 533 KB

## Wave Macros

This contains several macros to use for wave calculations. Macros include items like converting between various properties of regular waves, inputting various wave spectrums, spectrum integrations, encounter frequency, and reproducing a time history from a given spectrum. All macros are implemented just like any other spreadsheet function. It is entered as a formula into a cell.

The module implements the following macro functions

- SpecITTC: Generates the ITTC wave spectrum (Bretschneider wave spectrum).
- SpecJONSWAP: Generates the JONSWAP wave spectrum.
- SpecPiersonMoskowitz: Generates the Pierson and Moskowitz spectrum.
- TConv: Converts between modal period and several different methods of defining wave period for irregular waves.
- WaveConv: Converts between various wave properties for regular waves: frequency, period, wave number, wave length, celerity, and group velocity.
- SpecInt: Calculates area under the curve for a specified wave spectrum.
- WaveSpread: Takes a uniform wave spectrum and redistributes the wave energy into a multidirectional wave spectrum.
- EncounterFreq: Converts an input wave frequency to the encounter frequency. If a spectrum is provided, it converts the spectrum into the encountered wave spectrum.
- ResponseSpec: Calculates the response spectrum for a given set of response amplitude operators (RAO) and given wave spectrum.
- WaveScale: Calculates the amplitude of extreme wave responses for various levels of probability.
- TimeHist: calculates the time history of wave characteristics for a given input spectrum.

The download includes the following files

- macro files for MS Excel (modWavesRev1.0_MSExcel.bas, modInterpFunctionsRev2.0_MSExcel.bas, modSortingRev1.0_MSExcel.bas)
- macro files for Open Office / Libre Office (modWavesRev1.0_OpenCalc.bas, modInterpFunctionsRev1.2_OpenCalc.bas, modSortingRev1.0_OpenCalc.bas)
- MS Excel spreadsheet demonstrating use of wave macros
- Open Office spreadsheet demonstrating use of wave macros

License: The macros are provided under the GNU Public license. A copy of the license is included in the download.

Download “Wave Macros” WaveMacros_Rev3_0.zip – Downloaded 103 times – 242 KB

# Open Office Macros

## Interpolation Macros

Spreadsheets often have need to interpolate or extrapolate within a data set. These macros provide several functions with extensive support for all forms of interpolation and extrapolation of data tables. Includes the following functions.

- iePolate: Performs linear interpolation and exterpolation of a given data set.
- iPolate: Performs only linear interpolation of a given data set.
- ieSPolate: Performs 2nd order, non-linear interpolation and exterpolation of a given data set. Uses cubic splines.
- ie2DPolate: Performs interpolation across two independent variables in a data set.
- TabFind: Locates the address of a data table by matching the table name.

The download includes the following files.

- macro files for MS Excel (modInterpFunctionsRev2.0_MSExcel.bar)
- macro files for Open Office / Libre Office (modInterpFunctionsRev2.0_OpenCalc.bas)
- MS Excel spreadsheet demonstrating use of wave macros
- Open Office spreadsheet demonstrating use of wave macros

License: The macros are provided under the GNU Public license. A copy of the license is included in the download.

Download “Interpolation Macros” InterpFunctions.zip – Downloaded 113 times – 533 KB