Structured References Question

mlbrenes

New Member
Joined
Jun 22, 2017
Messages
4
Hi,

Is it possible to change a specific value in a structured reference calculation?

Basically I want to change the week depending on week I select from a dropdown in another cell.

My table has a column per week for the value I want to obtain, so I want the Sum Range to move depending on that week that I selected, I hope I'm making sense!

My formula is:

Code:
=SUMIFS(TM_Table[[#All],[[COLOR=#ff0000][B]2019-04[/B][/COLOR]]],TM_Table[[#All],[Depot]],[@Depot],TM_Table[[#All],[Category]],$CB$4,TM_Table[[#All],[Type]],[@[Planned/Unplanned]])

What I want to change is the [WEEK] to get the value in column BY3

And I have 2 tables, TM_Table:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Depot[/TD]
[TD]Category[/TD]
[TD]Type[/TD]
[TD]2019-01[/TD]
[TD]2019-02[/TD]
[TD]2019-03[/TD]
[TD]2019-04[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Count[/TD]
[TD]Planned[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Turnaround[/TD]
[TD]Planned[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Cost[/TD]
[TD]Planned[/TD]
[TD]£20[/TD]
[TD]£0[/TD]
[TD]£250[/TD]
[TD]£250[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Count[/TD]
[TD]Unplanned[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]2[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Turnaround[/TD]
[TD]Unplanned[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Cost[/TD]
[TD]Unplanned[/TD]
[TD]£400[/TD]
[TD]£500[/TD]
[TD]$700[/TD]
[TD]£200[/TD]
[/TR]
</tbody>[/TABLE]


The table that's calculating the values:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Depot[/TD]
[TD]Type[/TD]
[TD]Count[/TD]
[TD]Turnaround[/TD]
[TD]Cost[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Planned[/TD]
[TD]=FORMULA[/TD]
[TD]=FORMULA[/TD]
[TD]=FORMULA[/TD]
[/TR]
[TR]
[TD]Depot1[/TD]
[TD]Unplanned[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Depot2[/TD]
[TD]Planned[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Depot2[/TD]
[TD]Unplanned[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Depot3[/TD]
[TD]Planned[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Depot3[/TD]
[TD]Unplanned[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I appreciate your help!! I'm pretty desperate.

Thank you!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You could use INDIRECT and pass the column reference as a string, or use INDEX and match to return the relevant column based on the header?
 
Last edited:
Upvote 0
I figured it out :)

Used a HLOOKUP, in case you're interested this is the formula I used:

Code:
=HLOOKUP(Week,TM_Table[[#All],[2018-42]:[2019-52]],VLOOKUP(CONCATENATE([@Depot],"-",CB$4,"-",[@[Planned/Unplanned]]),TM_Table[[#All],[Concatenate]:[Value]],2,FALSE),FALSE)
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,471
Members
453,726
Latest member
JoeH57

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