Sub AjoutCalculs(Derlig As Long, ColDeb As Byte)
With ActiveSheet
.Cells(1, ColDeb).Value = "Entalpie ext" & vbLf & "de vapeur dans l'air"
' .Cells(1, ColDeb + 1).Value = "Pression de" & vbLf & "saturation"
' .Cells(1, ColDeb + 2).Value = "Pression de" & vbLf & "vapeur d 'eau"
' .Cells(1, ColDeb + 3).Value = "Entalpie ext"
' .Cells(2, ColDeb).FormulaR1C1 = "=((1,007*LC(-2)-0,026)+(((0,62*(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100)))/(96506-(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100))))*(2501+1,84*LC(-2))))"
'.Cells(2, ColDeb).FormulaR1C1 = "=((1,007*LC(-2)-0,026)+(((0,62*(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100)))/(96506-(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100))))*(2501+1,84*LC(-2))))"
' .Cells(2, ColDeb).FormulaR1C1 = "=((1.007*RC[-2]-0.026)+(((0.62*(RC[-1]*((610.78*EXP((RC[-2]/(RC[-2]+238.3))*17.2694))/100)))/(96506-(RC[-1]*((610.78*EXP((RC[-2]/(RC[-2]+238,3))*17.2694))/100))))*(2501+1.84*RC[-2])))"
.Cells(2, ColDeb).FormulaR1C1 = "=((1,007*RC[-2]-0,026)+(((0,62*(RC[-1]*((610,78*EXP((RC[-2]/(RC[-2]+238,3))*17,2694))/100)))/(96506-(RC[-1]*((610,78*EXP((RC[-2]/(RC[-2]+238,3))*17,2694))/100))))*(2501+1,84*RC[-2])))"
'formule excel '"=((1,007*LC(-2)-0,026)+(((0,62*(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100)))/(96506-(LC(-1)*((610,78*EXP((LC(-2)/(LC(-2)+238,3))*17,2694))/100))))*(2501+1,84*LC(-2))))
.Cells(2, ColDeb + 1).FormulaR1C1 = "=610.78*EXP((RC[-3]/(RC[-3]+238.3))*17.2694)"
' .Cells(2, ColDeb + 2).FormulaR1C1 = "=RC[-3]*(RC[-1]/100)"
' .Cells(2, ColDeb + 3).FormulaR1C1 = "=((1.007*RC[-5]-0.026)+(RC[-3]*(2501+1.84*RC[-5])))"
With .Range(.Cells(2, ColDeb), .Cells(Derlig, ColDeb + 3))
.FillDown
Application.Calculate
'***************************************************************************
' ' Partie a commenter pour conserver les formules dans les cellules
' .Copy
' .PasteSpecial Paste:=xlPasteValues
'***************************************************************************
End With
End With
End Sub