Thank you Mike "Excelisfun" - "theBombDiggity" Girvin!
@wayneseymour1
4 жыл бұрын
I have a data sheet that I input data from a user form. One aspect of the form is that as you finish adding the data and before you submit it to the data sheet a ID number is generated using the MAX function +1 in the VBA code which just increments 1,2,3,4. The user form is used to enter, add a Vendor (contractor,Owner or Company name), this is done via a combo box with the names and equipment type. some names are two or three words ,ie. "Bob Cat Services" or "Azan Heavy Equipment", "Ron Wilson"), but always a combo of more than one name. There is another combo box that holds the type of equipment owned or listed by the vendors,contractors("Backhoe","Roller","Dozer","Dump Truck"etc.) I would like to have a Label or text box that will, as the names,ie, vendor and equipment are entered it will create a unique ID Number... like for example "Bob Cat Services, uses BCS for the vendor, equipment like "Back-hoe" or Bh for the equipment followed by a number most likely starting out with 0001. Making the serial number; BCSBH0001. THIS WOULD CHANG DEPENDING ON THE NAME AND EQUIPMENT. but always using the first three letters or two of the vendor name like if its more than one word "B" from Bob, "C" from "Cat" and "S" from "services", then add the first two letters from the equipment BH for back-hoe or just the first two letters if its spelt "Backhoe". Then lastly adding 0001, to end up with a unique serial number BCSBH0001 which tells the company,vendor and the equipment type. This makes for each vendor the serial is different "Azan Equipment" would be AEBH0001, "Bob Cat Services" would be BCSBH0001 and so on. After that any addition entry would read the column of the ID in the data sheet and add the next sequential number belonging to that serial group , ie AEBH0001 would become AExx0002,(xx being the first two letters of the equipment type) or BCSxx0002 and so on. Granted something like "Dump Truck" may pose a problem. But thats the jist of what I'm trying to achieve. Hope someone can help. I'm new to VB so I find it hard to figure out the code. Please help. THANKS to everyone.
@ExcelVbaIsFun
4 жыл бұрын
Hi Wayne, Email me what you've got so far at excelvbaisfun@gmail.com if you would. I'd be happy to take a look at your demo workbook to see if I can help. One question off the top of my head is that backhoe may not be that intuitive to excel that it should be BH, unless the hyphen is there. But it's possible to do. Thanks Dan
@michaelosullivan1057
10 жыл бұрын
Thanks for the Video, very interesting!
@ExcelVbaIsFun
10 жыл бұрын
Very welcome! thanks for the comments!
@mfaizsamsubaha
5 жыл бұрын
The max code can be used for excel form?or only for vba userform?
@krn14242
10 жыл бұрын
Thanks Dan.
@ExcelVbaIsFun
10 жыл бұрын
Thanks super cool Contest-winnin' krn14242!!
@peyko6970
10 жыл бұрын
Hi, i have a basic question but yet i have not found how to do it.. I need to make my multipage turn vertical to the left, instead of horizontal. I know i need to use fmTabOrientationLeft, but i have not yet undestood where to put it :/
@chadcomeaux3114
9 жыл бұрын
My desired cell increased by one upon opening the form, GREAT!! But the cell gives an error of "Stored as text" so it doesn't increase with the next "form show".
@dbrown1575
5 жыл бұрын
I have a field in userform that I am creating and need to automate the serial numbers. I want the the serial number to be comprised of the following.... the first letters to be "WER-", followed by the 2-digit day, followed by the 2-digit month, followed by a four digit sequential internal number that has started from 1000. Example: if the date is December 12 and the internal number is at 1501 then I would like the auto-generated serial to be "WER-1212-1502" Please help.
@kuyabentoytv6279
7 жыл бұрын
Sir can I ask codes,, I know it would be very simple in your end... I just want to type Few Letters in a cell and it will automatically suggest the whole word ,,Ex. If I'm going to type OCC it will automatically suggest OCCUPATIONAL FEE,,, IN ORDER FOR ME NOT TO TYPE THE WHOLE WORDS instead,, That's all I needed to know Sir,, Please Thank you...
@miyamontero7561
7 жыл бұрын
how can you do this using looping? i want the same output but i need to use loop function...
@abdulbasetalhelaly9217
5 жыл бұрын
Thanks dan Plz What if i have more than one sheet ?
@bengtlee28
5 жыл бұрын
Hello! it was my same problem before. But i have found a solution for it.
@samh4440
10 жыл бұрын
I want to automatically add for Job ID every time I add a new row for example J116 the next row will automatically have J117 etc etc how do I do this?
@ExcelVbaIsFun
10 жыл бұрын
Sam H This should help you in auto incrementing letter-number combos. How to Increment Letters and Number Combinations LTS0001 becomes LTS0002 etc Dan
@josealbertmorenoeleocadio6688
10 жыл бұрын
WHAT IS THE NAME FOR THIS FORM IN YOUR DROPBOX?
@mohamedhasanbasari
6 жыл бұрын
Hi, Thank For Your Tuts If Starting No 0001 how do I do this?
@ExcelVbaIsFun
6 жыл бұрын
Hi Mohamed, Check out this video to help you: kzitem.info?o=U&video_id=vGguMYmAd_c Thanks Dan
@mohamedhasanbasari
6 жыл бұрын
Link not Working
@Villiam2010
9 жыл бұрын
I've done this on my vba code and it doesnt seem to increase the number, it just stays as 1 every time
@ExcelVbaIsFun
9 жыл бұрын
***** Hi villiam2010, did you ensure the 1 wasn't being considered a text, so "1" instead of 1? If so, try converting text to number using a +0. It could be that. hmmm
Пікірлер: 24