+ Reply to Thread
Results 1 to 5 of 5

Creating Count Column

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Creating Count Column

    How can I create a column thats values are just numbers in ascending order. So in this case I want numbers in ascending order starting at 1 starting at cell A2 and down the column until the Final Row which I have already defined previously in the Macro.

    Thanks in advance!
    Alexis

  2. #2
    Forum Contributor
    Join Date
    02-15-2010
    Location
    Everett, WA
    MS-Off Ver
    All versions; most components
    Posts
    188

    Re: Creating Count Column

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Creating Count Column

    Hmm so I tried this out. And it didnt work - here is my syntax.
    Dim RawRow As Long
    For RawRow = 2 To (FinalTime + 1)
    Range(wsR.Cells(2, 4), wsR.Cells((FinalTime + 1), 4)).Cells(RawRow, 4).Value = RawRow - 1
    Next RawRow

    What am I doing wrong?
    Thanks!
    - Alexis

  4. #4
    Forum Contributor
    Join Date
    02-15-2010
    Location
    Everett, WA
    MS-Off Ver
    All versions; most components
    Posts
    188

    Re: Creating Count Column

    Tough without seeing the rest of your macro, but, assuming wsR is your range, you want this:

    Please Login or Register  to view this content.
    If wsR refers to your worksheet, try this:

    Please Login or Register  to view this content.
    ... or:

    Please Login or Register  to view this content.
    ... or post your whole macro so I can see what all your variable refer to.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Creating Count Column

    Another:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1