+ Reply to Thread
Results 1 to 4 of 4

automatic number genaretion

  1. #1
    Forum Contributor
    Join Date
    02-11-2008
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    242

    automatic number genaretion

    HI,
    is there a way,where excel is going to genarate numbers automatically from a given series.like if I give a starting number as 1 and ending number as 100 it will give me the inbetween numbers like 2,3,4,5,6,7,8,9,10,11..............91,92,93....99 and so on.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: automatic number genaretion

    hi arnab0711
    use =randbetween(1,100)
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: automatic number genaretion

    Insert this function in a module:
    'http://www.vbaexpress.com/forum/showthread.php?t=26446
    Function TextSplit(rCell As Range)
    Dim l As Long
    Dim r As Long

    l = Left(rCell.Value, WorksheetFunction.Find("-", rCell.Value) - 1)
    r = Right(rCell.Value, Len(rCell.Value) - WorksheetFunction.Find("-", rCell.Value))

    For x = l To r
    If x <> r Then
    TextSplit = TextSplit & x & ","
    Else
    TextSplit = TextSplit & x
    End If
    Next x

    End Function
    '=TextSplit(A1)

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: automatic number genaretion

    with a function
    put lower limit in b1 upper limit in c1
    in a2 put =B1+1
    in a3 dragged down as far as you like
    =IF(ROW(A1)<$C$1-$B$1-1,A2+1,"")
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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