Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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)


--
Thundersixx
------------------------------------------------------------------------
Thundersixx's Profile: http://www.excelforum.com/member.php...o&userid=30556
View this thread: http://www.excelforum.com/showthread...hreadid=502093

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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"
wrote in message
...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
VBA Question: User Form and input masks MarianneR[_5_] Excel Programming 2 October 13th 05 08:48 PM
VBA Question: User Form and input masks MarianneR[_4_] Excel Programming 0 October 13th 05 07:41 PM
user input question BLW Excel Discussion (Misc queries) 2 May 23rd 05 08:41 PM
User input in cell Sean Excel Programming 3 October 29th 04 08:17 PM


All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"