Using named references dynamically

Molecheese

New Member
Joined
Jan 30, 2016
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have a table of data, with various categories and months, as below. The categories are grouped using named references - GROUP1, GROUP2, GROUP3 - and I am trying to write a formula to show the sum of all GROUP1 items for a particular month as defined by a separate cell. Please ask if you need any more information - any help would be great. Thanks!

1691152111928.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also are Group1 etc actual named ranges in the name manager?
 
Upvote 0
Thanks details updated - yes, the Group1, Group2 etc are named ranges. I think I found a way to get what I'm after by also naming the columns - MonthJan, MonthFeb for example - and using Sumproduct or something similar, but there is a lot of data so I would like to avoid having to create so many named ranges if I can. Hope that helps - please let me know if you need more
 
Upvote 0
Ok, if you change the Group ranges to cover (for instance) A2:G4 instead of A2:A4 then you can use
Fluff.xlsm
ABCDEFGH
1JanFebMarAprMayJunJul
2A123456
3B789101112
4C131415161718
5D192021222324
6E252627282930
7F313233343536
8G373839404142
9H434445464748
10I495051525354
11
12Group1Group2Group3
13Mar2781135
14Jun3690144
Master
Cell Formulas
RangeFormula
B13:B14,C14:D14B13=SUM(INDEX($B$2:$H$10,,XMATCH($A13,$B$1:$H$1)) INDIRECT(B$12))
C13:D13C13=SUM(INDEX($B$2:$H$10,,XMATCH($A13,$B$1:$H$1)) INDIRECT(C12))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top