I am working on template which gives me the unique ids based on the user input.
For e.g. I have the unique id in A2 as 20130118 and user enters the number of records in B2 as 13, I would need the incremental value as 2013011801 to 2013011813
I am working on template which gives me the unique ids based on the user input.
For e.g. I have the unique id in A2 as 20130118 and user enters the number of records in B2 as 13, I would need the incremental value as 2013011801 to 2013011813
You need a macro for this?
![]()
Please Login or Register to view this content.
If you like my contribution click the star icon!
Thank you for the macro.
I tried to change the cell reference values and it is giving me Index out of range error. My unique id is in C2 and number of rows is in C3. I want to start the autofill from A5.
'set starting point in A5
ActiveSheet.Range("A5").Value = (ActiveSheet.Range("C2").Value * 100) + 1
'create a series of x number of rows downwards
ActiveSheet.Range("A5").AutoFill ActiveSheet.Range("A5").Resize(ActiveSheet.Range("C3").Value), xlFillSeries
I think it worked this time! thanks for you help.![]()
quick question - first time I added 10 rows, I received 10 unique ids. Next time, I added 5 in the rows, nothing is happening till the time I deleted the values. Any idea?
Sorry, I am not entirely certain what you mean by the last post. Perhaps the target area needs to be blank for the autofill to work? Suggest to clear the output area first using
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks