0

I want applied my formula in some cell in my board, but when I want to apply another formula for the total, the columns are recalculated and the formula I applied for the total is applied to all the cells.

 Sub ...
 Application.Calculation = xlCalculationManual
 Application.CutCopyMode = False
 ActiveSheet.ListObjects.Add(xlSrcRange, Range("$I$3:$P$18"), ,     xlYes).Name = _
    "Tableau4"
 Range("Tableau4[[#Headers],[Colonne2]]").Select
 ActiveCell.FormulaR1C1 = "VB"
 Range("Tableau4[[#Headers],[Colonne3]]").Select
 ActiveCell.FormulaR1C1 = "Oui"
 Range("Tableau4[[#Headers],[Colonne4]]").Select
 ActiveCell.FormulaR1C1 = "Non"
 ...
 Range("M17").Select
 ActiveCell.FormulaR1C1 = "=SUM(R[-13]C:R[-1]C)"
 Range("M18").Select
 ActiveCell.FormulaR1C1 = ""
 Range("N17").Select

 ActiveCell.FormulaR1C1 = "=IF(RC[-4]=0,0,RC[-3]/RC[-4])"
 Range("N18").Select

 Range("O19").Select
 Sheets("Feuil13").Select
 ActiveCell.FormulaR1C1 = "=IF(RC[-5]=0,0,RC[-3]/RC[-5])"

 End Sub

Apllying the farmula Application.Calculation = xlCalculationManual, Don't work in my code. And I can not disable the automatic calculation I feel, because I already apply it on other sheets. In any case, disable it still does not work.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
XDSSIOP
  • 91
  • 3
  • 11
  • You might benefit from reading [How to avoid using Select in Excel VBA](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba). • Pleaese be more specific and ask a question (you didn't ask one yet). Note that *"Don't work in my code"* is no useful error description. Explain what the actual issue is and provide a [mcve] to reproduce your issue. – Pᴇʜ Apr 11 '19 at 12:38
  • If you're talking about adding a total row to a Table, you may need to turn on the Total's Row (check box in table options) – Mistella Apr 11 '19 at 13:06

1 Answers1

0

I would like the automatic calculation to be desat on a sheet because I made a table. When I apply a formula on the first cell, the calculation is done automatically on all cells. (I'm not clear because I do not speak basic English)

XDSSIOP
  • 91
  • 3
  • 11