Hi

I am currently using the Insert, Name function to define a dynamic range:

The name of the range is "taurine", and in the "Refers to" box I have this:

=OFFSET(RESULTS!$I$5,0,0,1,COUNTA(RESULTS!$3:$3)-3)

This works fine: the range is a selection of cells from row 5 in the RESULTS worksheet.
The selection starts at I5, and the number of cells selected depends on the number of entries in row 3.

As I say, this is fine, and I can plot values from the "taurine" range in a chart.

HOWEVER:
I want to define around 100 similar ranges, and to do so using Insert, Name would be far too laborious. How can I get VBA to select the range in my example? I have tried copying the above example into VBA in a variety of ways, but always get an error of some kind.

Please could somebody advise me on the syntax to use, ideally with an example of exactly what I should type into the VBA editor?

Thanks for reading

Craig