book.Sheets[1].Cells[2,3].Formula := '=IF(A1>100;A1*B1;A1*B2)';
With Workbook.Sheets[1] do begin Cells[1,1].Value := 100; Cells[2,1].Formula := '=IF(A1>70;A1/2;A1)'; Val := Cells[2,1].Value; //Val = 50 end;
With Workbook.Sheets[1] do begin Range['A2', 'F2'].Formula := Range['A1', 'F1'].Formula; end;
With Workbook.Sheets[1].Range['A1', 'F1'] do
Offset[1,0].Formula := Formula;