Some Kind of Dynamic Formula

chriscav

New Member
Joined
May 22, 2019
Messages
1
Sorry if my terminology isn't right or misleading. I'm trying to save some time (in the long run), by making some kind of dynamic formula. I've tried a number of things with no success at present.
Basically my formula as it stands, goes off to a second sheet called BCWS and returns a value in a column based on matching the row value. This all works well.
=IFERROR(INDEX(INDIRECT("'BCWS'!NQ:NQ"),MATCH(B:B,INDIRECT("'BCWS'!A:A"),0)),"0").

Im trying to get the formula to change the BCWS'!NQ:NQ" part, so that when I next run this particular report, it will know that it should no longer look for NQ:NQ but the next/required column along.

CBSActivityIDActivity NameBEP - Control AccountOriginal DurationStartFinish31-Mar-1907-Apr-1914-Apr-1921-Apr-1928-Apr-19
DE.DE.60.05DE.DE.60.05System605-ActiveEffluentCollection&Transfer218201-Apr-15 A15-Feb-24831473400376
DE.DE.60.10DE.DE.60.10System610-LowActiveEffluentCollection&Transfer218101-Apr-15 A15-Feb-24484121215
DE.DE.90.00DE.DE.90.00System900-CommonItemsfor900Systems126201-Apr-15 A19-May-208
DE.DE.90.01DE.DE.90.01System901-CE&IforCommonItems126701-Apr-15 A27-May-20
DE.DE.90.08DE.DE.90.08System908-CompressedAir112301-Apr-15 A18-Oct-19
DE.DE.90.10DE.DE.90.10System910-HPSteam31401-Apr-15 A29-Mar-19 A
DE.DE.90.17DE.DE.90.17System917-Condensate31401-Apr-15 A29-Mar-19 A
DE.DE.90.18DE.DE.90.18System918-CooledCondensate31401-Apr-15 A29-Mar-19 A
DE.DE.90.20DE.DE.90.20System920-Demineralisedwater31401-Apr-15 A29-Mar-19 A
DE.DE.90.25DE.DE.90.25System925-DomesticWater117101-Apr-15 A28-Nov-1967
DE.DE.90.30DE.DE.90.30System930-GroutWashing(R1)Water31401-Apr-15 A29-Mar-19 A
DE.DE.90.40DE.DE.90.40System940-DryRisers31401-Apr-15 A29-Mar-19 A
DE.DE.90.65DE.DE.90.65System965-Nitrogen116101-Apr-15 A11-Dec-1966556
DE.DE.90.66DE.DE.90.66System966-CarbonDioxide31401-Apr-15 A29-Mar-19 A

<colgroup><col><col><col><col><col><col><col><col span="5"></colgroup><tbody>
</tbody>

Now the columns on the BCWS sheet have heading with the date and I'm particularly interested in weeks 3 and 4 in any given period / month. NQ column is 7th April 2019. That's week 3. Week 4 is 14th April 2019. Then in Period / Month 2, weeks 3 and 4 are 19th May and 26th May.


I have another sheet called Validation which has the Periods / Months numbered 1 to 12 and the dates.
Week 3Week 4
Period 1April31-Mar07-Apr14-Apr21-Apr28-Apr
Period 2May05-May12-May19-May26-May
Period 3June02-Jun09-Jun16-Jun23-Jun30-Jun
Period 4July07-Jul14-Jul21-Jul28-Jul
Period 5August04-Aug11-Aug18-Aug25-Aug
Period 6September01-Sep08-Sep15-Sep22-Sep29-Sep
Period 7October06-Oct13-Oct20-Oct27-Oct
Period 8November03-Nov10-Nov17-Nov24-Nov
Period 9December01-Dec08-Dec15-Dec22-Dec29-Dec
Period 10January05-Jan12-Jan19-Jan26-Jan
Period 11February02-Feb09-Feb16-Feb23-Feb
Period 12March01-Mar08-Mar15-Mar22-Mar29-Mar
Week 3Week 4
Period 114/04/201921/04/2019

<colgroup><col span="4"><col span="2"><col></colgroup><tbody>
</tbody>



Is it possible to do what I'm looking to do or should I just do a find and replace the "NQ" manually. I guess in essence, I'm trying to negate doing the manual replace and automate it.

Sorry for the long winded post, any help or suggestions will be most gratefully received.

Thanks :)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi chriscav,

Assuming you are not looking for an explanation of relative references vs absolute ones, you may have to use VBA to change the value of a cell and increment it each time the report is run. There is now way (as far as I know) that a formula can change the actual value of a cell. Hence, an inability to keep track of how many times the report has been run.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,727
Members
449,049
Latest member
MiguekHeka

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