Reputation: 275
I have an excel file that has different formulas. What I am looking for is to modify only one element of that formula since due to the process that I am working on, the formula could change, but the period (eg 202112) is a field that must always exist, so I think I could not generate the formulas with a macro, since these are modified by another user. Is it possible to add a variable to the formula and update/change the value by pressing a button?
The following table is only to explain what I need, it is too simple, but it is not to enter the long formulas.
I would like to assign a macro to the button so that when pressing it the value of the variable "Period" is updated, for example 202112
Upvotes: 0
Views: 421
Reputation: 109
Without using macro you should change the excel recalculates settings;
-In Excel, click the Microsoft Office Button, click Excel Options, and then click the Formulas category and in the Calculation options section, under Workbook Calculation, click Manual and uncheck the checkbox.
Use this formula for your Ids+Period column;
=B2&C2&TEXT(TODAY(),"yyyymm")
To update your cell formula (or date). You should click the cell and after that command line and click enter. Done!
Upvotes: 1