Thread: Fill serie
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Fill serie

OK. You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()


Sub Macro()
varStart = InputBox("Enter Start Num")
varSeries = InputBox("Numbers to be filled" & _
String(3, vbLf) & "10,100,1000 etc;", , 100)
Range("A1") = varStart * varSeries
Range("A1").DataSeries Rowcol:=xlColumns, _
Type:=xlLinear, Step:=1, Stop:=Range("A1") + varSeries - 1
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Basta1980" wrote:

Jacob,

Am familair with that, but my co-workers who need to work with the same
workbook are not so Excel savvy. As I'm no VBA savvy I hoped that at least by
creating some code that helps them through the different options would make
my life easier and theres too.

Regards,

Basta

"Jacob Skaria" wrote:

Have you tried this option

--Type 31101234000 in Cell A1
--From menuEditFillseries
--Select 'Series In' as Columns
--Keep the step value as 1
--In Stop Value enter 31101234999
--Hit 'OK'

If this post helps click Yes
---------------
Jacob Skaria


"Basta1980" wrote:

Hi,

I would like to know if it is possible to fill a column based upon input
from a textbox. What I'm trying to do is; ask user to manually input first 8,
9 or 10 digits (fixed line number). Then the user has to choose (with the
help of three buttons) if he/she wants to automatically fill a serie by 10,
100 or 1000. So if a user fills in 31101234 and then click button 'add 1000'
(fictive name), excel fills the serie in column A, Row1 like this;
31101234000 down to 31101234999. And if this is possible, how do I go about?!

Regards

Basta1980