+ Reply to Thread
Results 1 to 2 of 2

Cell generation from user input question.

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    3

    Cell generation from user input question.

    I don't know if this is the right forum to be using, however I have a question. I've never done any programming in Excel before but willing to learn if you can point me in the right direction.This might be a simple question that you can help me with right away. Here we go:

    If a user inputs a Min and Max value, say 1000 & 10000. I would like a column in another sheet to produce cells from 1000 to 10000 in increments of 1000 (or if possible for large ranges, in increments of 10% of the max)

  2. #2
    Tom Ogilvy
    Guest

    Re: Cell generation from user input question.

    Dim lbound as Long, ubound as Long, inc as Long
    Dim i as Long, j as Long
    lbound = range("A1").value
    ubound = range("A2").Value
    inc = Application.Round((ubound - lbound + 1)*.10,0)
    if inc < 1000 then
    inc = 1000
    End if
    j = 1
    for i = lbound to ubound step inc
    Worksheets("Sheet2").Cells(j,1) = i
    j = j + 1
    Next

    there are certainly faster ways to get the data into excel, but this should
    be a start.
    --
    Regards,
    Tom Ogilvy


    "Thundersixx" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I don't know if this is the right forum to be using, however I have a
    > question. I've never done any programming in Excel before but willing
    > to learn if you can point me in the right direction.This might be a
    > simple question that you can help me with right away. Here we go:
    >
    > If a user inputs a Min and Max value, say 1000 & 10000. I would like a
    > column in another sheet to produce cells from 1000 to 10000 in
    > increments of 1000 (or if possible for large ranges, in increments of
    > 10% of the max)
    >
    >
    > --
    > Thundersixx
    > ------------------------------------------------------------------------
    > Thundersixx's Profile:

    http://www.excelforum.com/member.php...o&userid=30556
    > View this thread: http://www.excelforum.com/showthread...hreadid=502093
    >




+ 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