Hi,
I have traffic junctions flow data in 2 sheets: AM_Flows and PM_Flows.
Both sheets contain the traffic flow through each arm of each junction.
I have used named ranges to reference the time period (AM or PM), the highway junction code (eg. J3, J29, J35A etc.) and the junction arm (A,B,C or D).
So for example, named cell reference AM_J30_A contains the morning flows from Junction 30 arm A.
AM_J30_A + AM_J30_B + AM_J30_C + AM_J30_D = the total morning flow through Junction 30.
In a separate sheet, I have a table that needs to calculate the total flows through each junction (i.e. the sum of flows through every arm of a given junction) for each time period.
The formula would need to be dynamic in 2 ways:
- the table's column headers are AM and PM, so the column of a given cell in the table determines which set of named ranges are SUMed (e.g. AM_J30_A vs. PM_J30_A)
- The table's row headers are the junction codes, so the row of a given cell in the table again determines which set of named ranges are SUMed (e.g. AM_J30_A or AM_J31_A etc).
It seems that I can't use a SUMIF(INDIRECT(Period_Junction_*) i.e. sum any named range which starts with the desired time period and junction code.
Any help would be greatly appreciated. See attached.
Bookmarks