Hi
I had some answers to a post a couple of weeks ago which were amazing, and have solved that problem. But the person I was doing it for has asked for one step further.
Old post is here
(I still can't figure out how to do the attachment thing - have tried all of them - might be because I'm on a university network)? Hope the pastes work okay.
I have a list of labs, with the appropriate information about the number of machines, when last updated etc. The Year column is the number of years in the future that the machines are potentially going to be replaced.
[TABLE="width: 578"]
<tbody>[TR]
[TD]Location[/TD]
[TD]# Machines[/TD]
[TD]Cost[/TD]
[TD]Purchase Date[/TD]
[TD]Age[/TD]
[TD]Year[/TD]
[TD]Age at Replacement[/TD]
[/TR]
[TR]
[TD]Lab A[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]£27,500.00[/TD]
[TD="align: right"]28/07/2016[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab B[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]08/01/2014[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab C[/TD]
[TD="align: right"]41[/TD]
[TD="align: right"]£45,100.00[/TD]
[TD="align: right"]31/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab D[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab E[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab F[/TD]
[TD="align: right"]77[/TD]
[TD="align: right"]£84,700.00[/TD]
[TD="align: right"]28/07/2016[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab G[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]£29,700.00[/TD]
[TD="align: right"]01/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab H[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]£22,000.00[/TD]
[TD="align: right"]31/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab I[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab J[/TD]
[TD="align: right"]106[/TD]
[TD="align: right"]£116,600.00[/TD]
[TD="align: right"]29/03/2017[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab K[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]£41,800.00[/TD]
[TD="align: right"]09/01/2014[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab M[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]£60,500.00[/TD]
[TD="align: right"]01/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab N[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]£44,000.00[/TD]
[TD="align: right"]29/07/2016[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab O[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]£27,500.00[/TD]
[TD="align: right"]18/05/2017[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab P[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]£18,700.00[/TD]
[TD="align: right"]30/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab R[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]£13,200.00[/TD]
[TD="align: right"]30/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab S[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]£44,000.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
We now would like to show in another table, the lab and the year that it was updated with machines - which I have worked out (with this formula in Lab A / 2013) copied across and down:
{=IFNA(INDEX($B$3:$E$56,MATCH($K6&L$5,$B$3:$B$56&YEAR($E$3:$E$56),0),2),"")}
[TABLE="width: 475"]
<tbody>[TR]
[TD][/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]Lab A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab B[/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab C[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab D[/TD]
[TD][/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab E[/TD]
[TD][/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/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TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab P[/TD]
[TD]17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab Q[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab R[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab S[/TD]
[TD][/TD]
[TD][/TD]
[TD]40[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
But now, we'd like the lookup to look at the column Year, and from the column 2018 onwards, put how many years from this year that replacements are due, ie, Lab A is currently, 2016, and its "no of years" to be replaced is 5, we would like it to then appear again in 2021 and so on. I hope that all makes sense.
I know I probably need to use OFFSET but am quite bewildered about how, especially with quite a nested formula already.
I'd be grateful for any help at all.
Many thanks
Ally
I had some answers to a post a couple of weeks ago which were amazing, and have solved that problem. But the person I was doing it for has asked for one step further.
Old post is here
(I still can't figure out how to do the attachment thing - have tried all of them - might be because I'm on a university network)? Hope the pastes work okay.
I have a list of labs, with the appropriate information about the number of machines, when last updated etc. The Year column is the number of years in the future that the machines are potentially going to be replaced.
[TABLE="width: 578"]
<tbody>[TR]
[TD]Location[/TD]
[TD]# Machines[/TD]
[TD]Cost[/TD]
[TD]Purchase Date[/TD]
[TD]Age[/TD]
[TD]Year[/TD]
[TD]Age at Replacement[/TD]
[/TR]
[TR]
[TD]Lab A[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]£27,500.00[/TD]
[TD="align: right"]28/07/2016[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab B[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]08/01/2014[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab C[/TD]
[TD="align: right"]41[/TD]
[TD="align: right"]£45,100.00[/TD]
[TD="align: right"]31/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab D[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab E[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab F[/TD]
[TD="align: right"]77[/TD]
[TD="align: right"]£84,700.00[/TD]
[TD="align: right"]28/07/2016[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab G[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]£29,700.00[/TD]
[TD="align: right"]01/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab H[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]£22,000.00[/TD]
[TD="align: right"]31/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab I[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]£19,800.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab J[/TD]
[TD="align: right"]106[/TD]
[TD="align: right"]£116,600.00[/TD]
[TD="align: right"]29/03/2017[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab K[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]£41,800.00[/TD]
[TD="align: right"]09/01/2014[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab M[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]£60,500.00[/TD]
[TD="align: right"]01/07/2014[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab N[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]£44,000.00[/TD]
[TD="align: right"]29/07/2016[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab O[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]£27,500.00[/TD]
[TD="align: right"]18/05/2017[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Lab P[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]£18,700.00[/TD]
[TD="align: right"]30/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab R[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]£13,200.00[/TD]
[TD="align: right"]30/07/2013[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Lab S[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]£44,000.00[/TD]
[TD="align: right"]31/07/2015[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
We now would like to show in another table, the lab and the year that it was updated with machines - which I have worked out (with this formula in Lab A / 2013) copied across and down:
{=IFNA(INDEX($B$3:$E$56,MATCH($K6&L$5,$B$3:$B$56&YEAR($E$3:$E$56),0),2),"")}
[TABLE="width: 475"]
<tbody>[TR]
[TD][/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[TD]2022[/TD]
[/TR]
[TR]
[TD]Lab A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab B[/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab C[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab D[/TD]
[TD][/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab E[/TD]
[TD][/TD]
[TD][/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab F[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]77[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab G[/TD]
[TD][/TD]
[TD]27[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/T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TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab R[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lab S[/TD]
[TD][/TD]
[TD][/TD]
[TD]40[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
But now, we'd like the lookup to look at the column Year, and from the column 2018 onwards, put how many years from this year that replacements are due, ie, Lab A is currently, 2016, and its "no of years" to be replaced is 5, we would like it to then appear again in 2021 and so on. I hope that all makes sense.
I know I probably need to use OFFSET but am quite bewildered about how, especially with quite a nested formula already.
I'd be grateful for any help at all.
Many thanks
Ally