AnalysisRanges

One instance holds one range identifier and answers the named-range strings built from it. An analysis output sheet carries about sixty named ranges per table, and this class is where each of those names is spelled.

Create takes the identifier, BindId changes it and Id answers it. Each member gives one name: the value and label columns, the percentage columns, the row and column category ranges, the total and missing rows and columns and the cells where they cross, the section and table bounds, the time period names, and the spatial input cells.

WHICH NAMES LIVE HERE

The members are the name families built by MORE THAN ONE file, counted across the whole source tree. The second builder is often the graph writer, the linelist runtime or a standard module. A name with a single builder stays where it is.

A member whose other builder sits in a class the test harness cannot compile is defined here first and adopted when that class is registered.

ONE IDENTIFIER PER INSTANCE

The analysis writers work with two identifiers: the id of a table, and the id of the first table of its section. Several names are built from the table id in one class and from the section id in another. Binding one identifier per instance puts that choice in the constructor call, so tabNames and secNames read differently at the point of use.

THE SPATIAL TAG IS A PARAMETER

SpatialInput takes the spatial type from its caller. Telling a geo variable from a health facility one needs the dictionary, and this class holds no dictionary, no worksheet and no specification. It spells the string and TableSpecs decides the type. The class names no collaborator, so the builder and the generated linelist both carry it and read one definition of every string.

Depends on: Checking

Version: 1.0 (2026-07-30)

Factory

Create #

create

Factory returning an instance bound to one range identifier

Signature:

Public Function Create(ByVal rangeId As String) As AnalysisRanges

Binds the identifier every id-suffixed member below appends. Pass a table id for the names that belong to one table and a section id for the names that belong to the section, so the call site states which it means.

Parameters:

  • rangeId: String. A table id such as "BA_tab5" or a section id.

Returns: AnalysisRanges. Ready to use.

Throws:

  • InvalidArgument When rangeId is empty.

BindId #

bind-id

Store the range identifier

Signature:

Public Sub BindId(ByVal rangeId As String)

Called by Create only. Public because the factory builds a second instance and VBA gives a class no privileged access to another instance of itself.

Parameters:

  • rangeId: String. The identifier to hold.

Id #

id

The identifier this instance answers for

Signature:

Public Property Get Id() As String

Returns: String. The table or section id passed to Create.


Column families

ValuesCol #

values-col

Name of the nth value column

Signature:

Public Property Get ValuesCol(ByVal n As Long) As String

The three per-column families, each indexed by column number. One loop in the table writer names all three, and the formula writer reads them back by the same index.

Parameters:

  • n: Long. The one-based column number.

Returns: String. For example "VALUES_COL_3_BA_tab5".


LabelCol #

label-col

Name of the nth label column

Signature:

Public Property Get LabelCol(ByVal n As Long) As String

Parameters:

  • n: Long. The one-based column number.

Returns: String. For example "LABEL_COL_3_BA_tab5".


PercCol #

perc-col

Name of the nth percentage column

Signature:

Public Property Get PercCol(ByVal n As Long) As String

Parameters:

  • n: Long. The one-based column number.

Returns: String. For example "PERC_COL_3_BA_tab5".


PercLabelCol #

perc-label-col

Name of the percentage column header

Signature:

Public Property Get PercLabelCol() As String

One header serves the percentage columns of the table, so this one carries no column number while the three families above do.

Returns: String. For example "PERC_LABEL_COL_BA_tab5".


SpatialInput #

spatial-input

Name of the nth spatial input cell

Signature:

Public Property Get SpatialInput(ByVal n As Long, ByVal spatialType As String) As String

The tag depends on whether the table is grouped by an administrative level or by a health facility, and the caller supplies that answer because working it out needs a dictionary. An unrecognised type raises rather than falling back to the geographic tag: falling back is what named the cells one way while the formulas referenced the other, and a spatio-temporal table that passes validation always has one of the two prefixes.

Parameters:

  • n: Long. The one-based input row number.
  • spatialType: String. Either "hf" or "geo", as SpatialTableScopes answers.

Returns: String. For example "INPUTSPTHF_2_SPT_tab1".

Throws:

  • InvalidArgument When spatialType is neither "hf" nor "geo".

SpatialInputTag #

spatial-input-tag

The spatial input tag for a spatial type

Signature:

Public Property Get SpatialInputTag(ByVal spatialType As String) As String

Exposed on its own because a caller that names a whole block of input cells wants the tag once rather than per cell, and because the reverse direction below compares against the same two strings.

Parameters:

  • spatialType: String. Either "hf" or "geo".

Returns: String. Either "INPUTSPTHF_" or "INPUTSPTGEO_".

Throws:

  • InvalidArgument When spatialType is neither "hf" nor "geo".

IdOfSpatialInput #

id-of-spatial-input

The range id a spatial input cell name was built from

Signature:

Public Function IdOfSpatialInput(ByVal cellName As String) As String

SpatialInput builds "INPUTSPTGEO__", and this is the way back: the tag and the row number are cut off the front and the rest is the id. GeoModule reads the name off the active cell at run time, and an unnamed cell hands an empty string over, so the answer is empty for a name this class did not build: no tag at the front, no row number behind it, or nothing after the row number. Instance state is never read, so the member is callable on the predeclared instance.

Parameters:

  • cellName: String. A name such as "INPUTSPTGEO_2_SPT_tab1".

Returns: String. The range id, or an empty string.


Category and row families

RowCategories #

row-categories

Name of the row categories band

Signature:

Public Property Get RowCategories() As String

Names of the category bands, the value blocks and the markers that locate the table on the sheet.

Returns: String. For example "ROW_CATEGORIES_BA_tab5".


LabelRowCategories #

label-row-categories

Name of the header cell above the row categories

Signature:

Public Property Get LabelRowCategories() As String

Returns: String. For example "LABEL_ROW_CATEGORIES_BA_tab5".


ColumnCategories #

column-categories

Name of the column categories band

Signature:

Public Property Get ColumnCategories() As String

Returns: String. For example "COLUMN_CATEGORIES_BA_tab5".


InteriorValues #

interior-values

Name of the block of data cells

Signature:

Public Property Get InteriorValues() As String

Returns: String. For example "INTERIOR_VALUES_BA_tab5".


OuterValues #

outer-values

Name of the block of data cells including the totals

Signature:

Public Property Get OuterValues() As String

Returns: String. For example "OUTER_VALUES_BA_tab5".


Section #

section

Name of the section heading cell

Signature:

Public Property Get Section() As String

Returns: String. For example "SECTION_BA_tab5".


EndTable #

end-table

Name of the cell marking the end of the table

Signature:

Public Property Get EndTable() As String

Returns: String. For example "ENDTABLE_BA_tab5".


StartRow #

start-row

Name of the start-row marker

Signature:

Public Property Get StartRow() As String

Returns: String. For example "STARTROW_BA_tab5".


StartCol #

start-col

Name of the start-column marker

Signature:

Public Property Get StartCol() As String

Returns: String. For example "STARTCOL_BA_tab5".


Total and missing intersections

TotalRow #

total-row

Name of the total row band

Signature:

Public Property Get TotalRow() As String

The total and missing bands, and the four cells where they cross. The writer names them and the formula writer fills them, which is why every one of these has two builders today.

Returns: String. For example "TOTAL_ROW_BA_tab5".


TotalCol #

total-col

Name of the total column band

Signature:

Public Property Get TotalCol() As String

Returns: String. For example "TOTAL_COL_BA_tab5".


MissingRow #

missing-row

Name of the missing row band

Signature:

Public Property Get MissingRow() As String

Returns: String. For example "MISSING_ROW_BA_tab5".


MissingCol #

missing-col

Name of the missing column band

Signature:

Public Property Get MissingCol() As String

Returns: String. For example "MISSING_COL_BA_tab5".


TotalRowValues #

total-row-values

Name of the values inside the total row

Signature:

Public Property Get TotalRowValues() As String

Returns: String. For example "TOTAL_ROW_VALUES_BA_tab5".


TotalColValues #

total-col-values

Name of the values inside the total column

Signature:

Public Property Get TotalColValues() As String

Returns: String. For example "TOTAL_COL_VALUES_BA_tab5".


MissingRowValues #

missing-row-values

Name of the values inside the missing row

Signature:

Public Property Get MissingRowValues() As String

Returns: String. For example "MISSING_ROW_VALUES_BA_tab5".


MissingColValues #

missing-col-values

Name of the values inside the missing column

Signature:

Public Property Get MissingColValues() As String

Returns: String. For example "MISSING_COL_VALUES_BA_tab5".


TotalTotal #

total-total

Name of the total row and total column intersection

Signature:

Public Property Get TotalTotal() As String

Returns: String. For example "TOTAL_TOTAL_BA_tab5".


TotalMissing #

total-missing

Name of the total row and missing column intersection

Signature:

Public Property Get TotalMissing() As String

Returns: String. For example "TOTAL_MISSING_BA_tab5".


MissingTotal #

missing-total

Name of the missing row and total column intersection

Signature:

Public Property Get MissingTotal() As String

Returns: String. For example "MISSING_TOTAL_BA_tab5".


MissingMissing #

missing-missing

Name of the missing row and missing column intersection

Signature:

Public Property Get MissingMissing() As String

Returns: String. For example "MISSING_MISSING_BA_tab5".


Temporal families

TimeUnit #

time-unit

Name of the time unit control cell

Signature:

Public Property Get TimeUnit() As String

The date inputs, the period markers and the time unit control.

Returns: String. For example "TIME_UNIT_TS_tab2".


StartDate #

start-date

Name of the start date cell

Signature:

Public Property Get StartDate() As String

Returns: String. For example "START_DATE_TS_tab2".


EndDate #

end-date

Name of the end date cell

Signature:

Public Property Get EndDate() As String

Returns: String. For example "END_DATE_TS_tab2".


StartTimePeriod #

start-time-period

Name of the period start marker

Signature:

Public Property Get StartTimePeriod() As String

Returns: String. For example "START_TIME_PERIOD_TS_tab2".


EndTimePeriod #

end-time-period

Name of the period end marker

Signature:

Public Property Get EndTimePeriod() As String

Returns: String. For example "END_TIME_PERIOD_TS_tab2".


FirstValueStartTime #

first-value-start-time

Name of the first value of the period

Signature:

Public Property Get FirstValueStartTime() As String

One of the names built from the table id in the table writer and from the section id in the formula writer. Bind the instance to whichever the call means and the difference stops being invisible.

Returns: String. For example "FIRST_VALUE_START_TIME_TS_tab2".


InfoStartDate #

info-start-date

Name of the start date information cell

Signature:

Public Property Get InfoStartDate() As String

Returns: String. For example "INFO_START_DATE_TS_tab2".


InfoEndDate #

info-end-date

Name of the end date information cell

Signature:

Public Property Get InfoEndDate() As String

Returns: String. For example "INFO_END_DATE_TS_tab2".


InfoAnaPeriod #

info-ana-period

Name of the analysis period information cell

Signature:

Public Property Get InfoAnaPeriod() As String

Returns: String. For example "INFO_ANA_PERIOD_TS_tab2".


ValidationMinDate #

validation-min-date

Name of the minimum date validation cell

Signature:

Public Property Get ValidationMinDate() As String

Returns: String. For example "VALIDATION_MIN_DATE_TS_tab2".


ValidationMaxDate #

validation-max-date

Name of the maximum date validation cell

Signature:

Public Property Get ValidationMaxDate() As String

Returns: String. For example "VALIDATION_MAX_DATE_TS_tab2".


MinMinDate #

min-min-date

Name of the earliest date across the section

Signature:

Public Property Get MinMinDate() As String

Returns: String. For example "MIN_MIN_DATE_TS_tab2".


MaxMaxDate #

max-max-date

Name of the latest date across the section

Signature:

Public Property Get MaxMaxDate() As String

Returns: String. For example "MAX_MAX_DATE_TS_tab2".


UserStartDate #

user-start-date

Name of the cell the reader types the first date into

Signature:

Public Property Get UserStartDate() As String

The table writer names the cell and six formulas of the formula writer read it, so it belongs here beside the two dates derived from it.

Returns: String. For example "USER_START_DATE_TS_tab2".


UserEndDate #

user-end-date

Name of the cell the reader types the last date into

Signature:

Public Property Get UserEndDate() As String

Returns: String. For example "USER_END_DATE_TS_tab2".


Spatial control families

AdmDropdown #

adm-dropdown

Name of the administrative level dropdown cell

Signature:

Public Property Get AdmDropdown() As String

The administrative level dropdown and the population divisor.

Returns: String. For example "ADM_DROPDOWN_SPT_tab1".


DevidePop #

devide-pop

Name of the population divisor control cell

Signature:

Public Property Get DevidePop() As String

Returns: String. For example "DEVIDEPOP_SPT_tab1".


PopFact #

pop-fact

Name of the population factor cell

Signature:

Public Property Get PopFact() As String

Returns: String. For example "POPFACT_SPT_tab1".


PopFactLabel #

pop-fact-label

Name of the population factor header cell

Signature:

Public Property Get PopFactLabel() As String

Returns: String. For example "POPFACTLABEL_SPT_tab1".


PopPrevFact #

pop-prev-fact

Name of the previous population factor cell

Signature:

Public Property Get PopPrevFact() As String

Returns: String. For example "POPPREVFACT_SPT_tab1".


PreviousAdm #

previous-adm

Name of the previous administrative level cell

Signature:

Public Property Get PreviousAdm() As String

Returns: String. For example "PREVIOUS_ADM_SPT_tab1".


Workbook-wide lists

TimeUnitList #

time-unit-list

Name of the time unit choice list

Signature:

Public Property Get TimeUnitList() As String

Names carrying no identifier, because one copy of each serves every table on the sheet. Read them off the predeclared instance without calling Create.

ONE LIST SERVES THE WHOLE WORKBOOK

The time units are a workbook-level dropdown on the list sheet, added by Linelist.Prepare through the standard DropdownLists manager. Every temporal table on every sheet binds its dropdown to this one name, and GetAgg in CustomLinelistFunctions reads the same name to map the chosen label back to a time unit.

The sheet used to carry its own copy: a time series sheet built TIME_UNIT_LIST and a spatio-temporal sheet built SPTIME_UNIT_LIST, because a range name resolves to one cell block and the two sheets each wanted their own. The reader in CustomLinelistFunctions asked for the plain name whatever sheet it ran on, so a workbook whose only temporal analyses were spatio-temporal had no such name and every period cell answered #VALUE!.

The spelling is what DropdownLists derives from the list name TIME_UNIT_NAME below and the "dropdown_" prefix of the standard manager. TestAnalysisRanges pins the two together.

Returns: String. "dropdown_time_unit".


TimeUnitListName #

time-unit-list-name

The dropdown list name the time units are registered under

Signature:

Public Property Get TimeUnitListName() As String

What Linelist.Prepare passes to DropdownLists.Add. The workbook-level name above is what every reader uses; this is the registry key that produces it.

Returns: String. "time_unit".


AdmUnitList #

adm-unit-list

Name of the administrative unit choice list

Signature:

Public Property Get AdmUnitList() As String

Returns: String. "ADM_UNIT_LIST".


PopulationFactorList #

population-factor-list

Name of the population factor choice list

Signature:

Public Property Get PopulationFactorList() As String

Returns: String. "POPULATION_FACTOR_LIST".


Internal members (not exported)

Error management

ThrowError #

throw-error

Raise a project error naming this class

Signature:

Private Sub ThrowError(ByVal errNumber As Long, ByVal message As String)

Parameters:


Used in (7 file(s))