# Excel/VBA

## Plotting dynamic ranges in Excel

One annoying thing about using charts in Excel to represent data is that by default it encourages you to define a finite sheet range to plot data. This can be annoying when you’re dealing with data where the total number…

## Functions for calculating the New Zealand seismic ‘Parts’ coefficient (Part 6)

Following on from the previous posts in this series where we calculated the seismic coefficients from NZS1170.5 and generated ADRS curves. This post covers generating the parts and components coefficient in accordance with Chapter 8 of NZS1170.5. Some time ago…

## Update to ADRS curve generation functions … now works in Excel 2019 plus random side-tracking… (Part 5)

As pointed out here in a recent comment by user Jason on the last post in this series, the VBA code for generating ADRS curves did not work in Excel 2019 as it turns out Excel 2019 does not include…

## How have I not known this ….. until now …

Recently came across this thing in Excel completely by accident, unsure how long it has been a thing? I’ve never ever read anything about it before on the internet or ever seen anyone using it before. Maybe it’s been a…

## VBA functions for determining (and graphing of) moment, shear, and deflection for a simply supported beams +/- cantilevers (Part 3)

Well after saying here that there was limited practical use for point moments for a simply supported beam, so I wasn’t going to (didn’t see a need to) include them. I’ve eaten those words now and added the ability to…

## Using error bars to highlight chart values

This is a handy technique that I was recently reminded of, using error bars to highlight values on XY scatter charts. If you have an Excel chart you might often have the need to highlight a certain value of interest.…

## Fun with functions…. Improving Excels native REPLACE() function

You know what annoys me about Excels built in REPLACE() function, it does not work like the equivalent VBA function Replace() function. It’s that simple and that is enough of a reason to think twice about using it if you…

## VBA functions for determining (and graphing of) moment, shear, and deflection for a simply supported beams +/- cantilevers (Part 2)

One thing to state up front, the shear, moment and deflection are all based on the loads given, so if they are factored ultimate loads then the moment, shear and deflection are factored. Which for the deflection might not be…

## VBA functions for determining (and graphing of) moment, shear, and deflection for a simply supported beams +/- cantilevers (Part 1)

Today we bring you moment, shear, deflection stuff! Sharing some basic VBA functions for determining the moment, shear and deflection of a simply supported beam (with or without cantilever) under almost any typical loading scenario imaginable. Point loads, variable length…

## Fun with functions….Use cases for Excels LET() function

If you’re not aware of what the LET() function is, prepare to be informed (and get out from under the rock you’ve been hiding under!). The LET function was introduced in July 2020, and I must admit it wasn’t until…

## Lambda functions coming in Excel!

Well, it’s not often I wake up at 4am and get excited about Excel formulas. Today was one of those days though. There on Google was the recommendation for a link saying on sheet lambda functions are on their way…

## ADRS curve generation functions for the New Zealand seismic code (Part 4)

Following on from the previous blog posts in this series that provided functions for calculating the NZS1170.5 seismic coefficient. I’ve added some further functions to the GitHub repository that utilise the previous functions to generate an ADRS curve in accordance…

## Excel…. Version control…. Git the hell out of here!

Version tracking Excel VBA code with git…. I’m not talking about uploading your spreadsheets to GitHub and calling it a day…. boring, we can do a bit better than that obviously! I’m talking about extracting your actual VBA code from…

## Functions for calculating the New Zealand seismic coefficient Cd(T) and associated parameters (Part 3)

In this final instalment let’s use the functions. They should hopefully be self-explanatory with the VBA comments, but there are a couple of subtleties to be aware of.

## Functions for calculating the New Zealand seismic coefficient Cd(T) and associated parameters (Part 2)

The functions discussed in Part 1 are outlined below. Click here to go to the GitHub repository with the full code and some extras. Or simply cut and paste from this page.

## Functions for calculating the New Zealand seismic coefficient Cd(T) and associated parameters (Part 1)

As exciting as it is calculating seismic coefficients (it’s not), you get sick of doing it by hand and implementing it time after time in various spreadsheets. Theres nothing worse than seeing someone calculate their seismic coefficient wrong on page…