swartzfeger
New Member
- Joined
- May 23, 2022
- Messages
- 17
- Platform
- Windows
- MacOS
All,
I'm working on a fairly complex serialized number project and my formulas in the workbook have worked well so far. The challenge was to increment a sequence with mixed values, ie, ABC00000001. I figured that part out by splitting the fixed alpha prefix ("ABC") from the main integer body to be incremented ("00000001") and defining the fixed length of the integer string ("00000000"). So now, if a user enters the starting sequence number of 100 in their dashboard, the formula =$A$2&TEXT(B2,"00000000") will join [ABC]+[00000]+[100] to = ABC00000100 and increment it correctly. Yay! It works!
Now for the issue:
The user dashboard (Sheet1) asks for a few criteria -- starting sequence number, total numbers in sequence, and then dividing that total sequence into printable "rolls". The dashboard also asks for starting roll number.
Let's say the total numbers in the sequence is 1000, with 100 numbers in each batch. That would give us 10 rolls. Let's say the user defined the starting ROLL number as "19" and the starting SEQUENCE number as "1".
The problem I'm facing:
The user dashboard is Sheet 1. In Sheet 2, I want to create numbered and serialized rows for the user to work from. Based on user-defined input example from above:
Roll Start # End#
19 ABC00000001 ABC00000100
20 ABC00000101 ABC00000200
21 ABC00000201 ABC00000300
... etc... etc...
28 ABC00000901 ABC00001000
I've managed to increment a string with mixed data types, and I've managed to create a CRUDE macro to insert rows into Sheet 2, but I need the rows to be numbered based on user-defined starting roll number (let's say dashboard!A2). The other issue I'm facing is figuring out how to insert these rows beginning with a specified row number (the macro I wrote inserted the correct number of rows, but it inserted them before my column headers).
The second issue -- populating the inserted rows with the starting sequence number and ending sequence number.
So I think I need to dim/declare a rollNumber, startNumber and endNumber
and also say something like startNumber("dashboard!B2")+999 = endNumber
So essentially, Sheet2 would look something like this: (declaring rollNumber as dashboard!A2 and startNumber as dashboard!B2 ???)
SHEET 2
-------------------------------------------------------
1 |A1 |B1 |C1 |
2 |dashboard!A2 |dashboard!B2 |=B2+999 |
3 |=A2+1 |=C2+1 |=B3+999 |
4 | etc... incrementing until number of user-defined rows/rolls are inserted
It's been almost two decades since I messed with vbscript and php so my brain is making a mess of all this, lol!
Thank you so much for any help or pointers!
I'm working on a fairly complex serialized number project and my formulas in the workbook have worked well so far. The challenge was to increment a sequence with mixed values, ie, ABC00000001. I figured that part out by splitting the fixed alpha prefix ("ABC") from the main integer body to be incremented ("00000001") and defining the fixed length of the integer string ("00000000"). So now, if a user enters the starting sequence number of 100 in their dashboard, the formula =$A$2&TEXT(B2,"00000000") will join [ABC]+[00000]+[100] to = ABC00000100 and increment it correctly. Yay! It works!
Now for the issue:
The user dashboard (Sheet1) asks for a few criteria -- starting sequence number, total numbers in sequence, and then dividing that total sequence into printable "rolls". The dashboard also asks for starting roll number.
Let's say the total numbers in the sequence is 1000, with 100 numbers in each batch. That would give us 10 rolls. Let's say the user defined the starting ROLL number as "19" and the starting SEQUENCE number as "1".
The problem I'm facing:
The user dashboard is Sheet 1. In Sheet 2, I want to create numbered and serialized rows for the user to work from. Based on user-defined input example from above:
Roll Start # End#
19 ABC00000001 ABC00000100
20 ABC00000101 ABC00000200
21 ABC00000201 ABC00000300
... etc... etc...
28 ABC00000901 ABC00001000
I've managed to increment a string with mixed data types, and I've managed to create a CRUDE macro to insert rows into Sheet 2, but I need the rows to be numbered based on user-defined starting roll number (let's say dashboard!A2). The other issue I'm facing is figuring out how to insert these rows beginning with a specified row number (the macro I wrote inserted the correct number of rows, but it inserted them before my column headers).
The second issue -- populating the inserted rows with the starting sequence number and ending sequence number.
So I think I need to dim/declare a rollNumber, startNumber and endNumber
and also say something like startNumber("dashboard!B2")+999 = endNumber
So essentially, Sheet2 would look something like this: (declaring rollNumber as dashboard!A2 and startNumber as dashboard!B2 ???)
SHEET 2
-------------------------------------------------------
1 |A1 |B1 |C1 |
2 |dashboard!A2 |dashboard!B2 |=B2+999 |
3 |=A2+1 |=C2+1 |=B3+999 |
4 | etc... incrementing until number of user-defined rows/rolls are inserted
It's been almost two decades since I messed with vbscript and php so my brain is making a mess of all this, lol!
Thank you so much for any help or pointers!