Forum Discussion
how to make a cell calculate a formula of an other cell
To put it simply, i need my cell A1 to calculate this text write in cell A2 :
SI([@[Résultat]]<=[@[Spec / limite sup]];"CF";"NC")
but this text is obtained by using the formula
=RECHERCHEV(CONCATENER([@criteria1];[@criteria2]);Tableaudatabase;2;FAUX))
I am really sorry, but I can't visualize what you want.
- molikyMar 23, 2023Copper Contributor
HansVogelaari made an excel sheet to explain what i need.
i'm open to new suggestion too.
translation of the french text inside :
"Hello,
I want to calculate my compliance box (yellow) automatically according to the result (variable) and according to the limits set for each combination of reference/test.
The source of the values is in the tab "sources of the formulas" and are recalled with the help of RECHERCHEV in this table for practicality.
The formula to be used for the calculation of conformity is also recalled on this sheet from the sheet "sources of formulas" and is different for each line and each result.
A big part of the work is done, but I can't manage to switch from "the cell contains a formula in text form" to "the cell calculates the formula stored in text".
Maybe it's a common syntax error, but I'm stuck at this point.
Any ideas?Thanks in advance."
- HansVogelaarMar 23, 2023MVP
The attached version is a macro-enabled workbook; you will have to allow macros when you open it.
There is code in the worksheet module that will automatically change the Conformité formula if you change a cell in the Référence or Test columns.
- molikyMar 24, 2023Copper Contributorthank you for your answer,
but when i tried to use your code in my worksheet it didn't work.it is supposed to apply every time a "test" or "reference" cell is modified but if i erase the conformity cell then try to change the test it doesn't reappears.
and if i change the formula used to calculate the conformity it doesn't update in the conformity cell.
am i suppose to activate it manually?
Plus i was more looking for something else like a new function coded in VBA maybe, that would activate only when i use it