Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I want VBA Code for formula which is like this
The Formula is in loop i value keep on changing in loop Di=Ai+B(i-1)-C(i-2) So in D10 then formula should be like this =A10+B9-C8 I don't want R1C1 Method I am trying for last two weeks... Regards Dhir |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Am Sun, 24 Mar 2013 21:31:42 -0700 (PDT) schrieb dhir: I want VBA Code for formula which is like this The Formula is in loop i value keep on changing in loop Di=Ai+B(i-1)-C(i-2) So in D10 then formula should be like this =A10+B9-C8 you don't have to loop. You can autofill the formula. Try: Sub Test() Dim LRow As Long LRow = Cells(Rows.Count, 1).End(xlUp).Row Range("D3").Formula = "=A3+B2-C1" Range("D3").AutoFill Range("D3:D" & LRow) End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
plotting column chart whch colors the bars diff for diff comm | Charts and Charting in Excel | |||
SUMIF formula required to search for 2 diff values in 2 diff colum | Excel Worksheet Functions | |||
how you make links between diff. cells on diff. work sheets | Excel Worksheet Functions | |||
code to input date after diff. cell selected | Excel Programming | |||
code for sum of sht with diff # of rows | Excel Programming |