Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to use code using a fixed starting point and a variable end point
the code I am using is this Dim lastrow4 As Long lastrow4 = ActiveSheet.Cells(Rows.Count, "b").End(xlUp).Row * -1 Range("D" & lastrow2) = "=SUM(R[lastrow4]C:R[-1]C)" Range("E" & lastrow2) = "=SUM(R[lastrow4]C:R[-1]C)" the idea is that lastrow4 is the lastrow, in code if it was a fixed start and end point it would read Dim lastrow2 As Long, lastrow4 As Long lastrow4 = ActiveSheet.Cells(Rows.Count, "b").End(xlUp).Row * -1 lastrow2 = ActiveSheet.Cells(Rows.Count, "b").End(xlUp).Row + 1 Range("D" & lastrow2) = "=SUM(R[-63]C:R[-1]C)" the first cell in the calculation is always D7 or E7 etc but the ending cell is variable, any help is as alway appreciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find first empty cell in column and start transpose next row in that cell | Excel Discussion (Misc queries) | |||
Fixed column, variable rows | Excel Programming | |||
Fixed column- Variable row # | Excel Discussion (Misc queries) | |||
From a fixed cell to a variable | Excel Programming | |||
reference cell value from fixed column with variable row | Excel Discussion (Misc queries) |