Forum Discussion
moliky
Mar 09, 2023Copper Contributor
how to make a cell calculate a formula of an other cell
Hello, so i have this issue with my table: i want my cell on the "result" table to calcul a different formula according to 2 criterias in a "database" table. i manage to rechercheV my formula so...
HansVogelaar
Mar 24, 2023MVP
(1) D2 contains a formula.
(2) I cleared D2.
(3) I changed B2, and as a result, D2 contains a formula again.
The formulas in column D will be updated when you change a value in columns B or C. To make then change when you edit a formula on the 'source des formules' sheet:
Right-click the sheet tab of the 'source des formules' sheet.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cl As Range
If Not Intersect(Me.ListObjects("Tableau6").DataBodyRange, Target) Is Nothing Then
For Each cl In Worksheets("résultats").ListObjects("Tableau2").ListColumns("Conformité").DataBodyRange
cl.Formula = "=" & cl.Offset(0, 4).Value
Next cl
End If
End Submoliky
Mar 24, 2023Copper Contributor
HansVogelaari send you back the files with yellow and blue colors to show the problem
- molikyMar 27, 2023Copper Contributor
HansVogelaarsorry i didn't send the righ sheet, this one is the one
- HansVogelaarMar 24, 2023MVP
I don't see blue colors. Here is the workbook with the formula.