Help on generating a number series using a macro
Solved/Closed
sbhambra
Posts
1
Registration date
Monday November 12, 2012
Status
Member
Last seen
November 12, 2012
-
Nov 12, 2012 at 06:38 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 15, 2012 at 07:53 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 15, 2012 at 07:53 PM
Related:
- Help on generating a number series using a macro
- Best scandinavian crime series on netflix - Guide
- Audio track download for series - Guide
- Spell number in excel without macro - Guide
- Hitman 3 cheats xbox series x - Guide
- Xbox series x 3d blu ray - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Nov 15, 2012 at 07:51 PM
Nov 15, 2012 at 07:51 PM
try this macro (result will be in columns F and G
Sub test() Dim r As Range, c As Range, dest As Range, x As Long, y As Long Range(Range("F2"), Range("F2").End(xlToRight)).EntireColumn.Delete Set r = Range(Range("C1"), Range("C1").End(xlDown)) For Each c In r x = c.Value Set dest = Cells(Rows.Count, "F").End(xlUp).Offset(1, 0) Range(dest, dest.Offset(x - 1, 0)).FormulaArray = Cells(c.Row, "A") Next c Range("G2") = 1 y = WorksheetFunction.Sum(r) Range(Range("G2"), Range("G2").Offset(y - 1, 0)).DataSeries , Step:=1, Trend:=False End Sub
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Nov 15, 2012 at 07:53 PM
Nov 15, 2012 at 07:53 PM
basic data are in columns A TO c IN rows 1 to 4