blackmajik072
New Member
- Joined
- Jul 18, 2018
- Messages
- 3
Hi folks,
I'm trying to figure out a formula which will do a lookup of a region to find cities to sum sales in an associated table. I can manually do this by hard coding SUMIFS statements. However this is not scalable and will be too difficult to maintain before long. Any ideas on how I might achieve this? Many thanks.
Sales by Region
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Region[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]25[/TD]
[TD]97[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]12[/TD]
[TD]20[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]34[/TD]
[TD]13[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]20[/TD]
[TD]47[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total[/TD]
[TD]91[/TD]
[TD]177[/TD]
[TD]125[/TD]
[/TR]
</tbody>[/TABLE]
Region/City Lookup Table
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Region[/TD]
[TD]City[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]Sydney[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]Brisbane[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]Hobart[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]Newcastle[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]Perth[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]Gold Coast[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]Broome[/TD]
[/TR]
</tbody>[/TABLE]
Sales by City
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]City[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[/TR]
[TR]
[TD]Broome[/TD]
[TD]10[/TD]
[TD]15[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]Melbourne[/TD]
[TD]20[/TD]
[TD]47[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD]Gold Coast[/TD]
[TD]34[/TD]
[TD]13[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]Sydney[/TD]
[TD]11[/TD]
[TD]43[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]Newcastle[/TD]
[TD]14[/TD]
[TD]54[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]Perth[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to figure out a formula which will do a lookup of a region to find cities to sum sales in an associated table. I can manually do this by hard coding SUMIFS statements. However this is not scalable and will be too difficult to maintain before long. Any ideas on how I might achieve this? Many thanks.
Sales by Region
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Region[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]25[/TD]
[TD]97[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]12[/TD]
[TD]20[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]34[/TD]
[TD]13[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]20[/TD]
[TD]47[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total[/TD]
[TD]91[/TD]
[TD]177[/TD]
[TD]125[/TD]
[/TR]
</tbody>[/TABLE]
Region/City Lookup Table
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Region[/TD]
[TD]City[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]Sydney[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]Brisbane[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]Hobart[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]Newcastle[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]Perth[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]Gold Coast[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]Broome[/TD]
[/TR]
</tbody>[/TABLE]
Sales by City
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]City[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[/TR]
[TR]
[TD]Broome[/TD]
[TD]10[/TD]
[TD]15[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]Melbourne[/TD]
[TD]20[/TD]
[TD]47[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD]Gold Coast[/TD]
[TD]34[/TD]
[TD]13[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]Sydney[/TD]
[TD]11[/TD]
[TD]43[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]Newcastle[/TD]
[TD]14[/TD]
[TD]54[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]Perth[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]