Hello
I would like generate an order number with a Suffix and Prefix
Format is as follows: MFJ10062014567
MFJ = Prefix
10062021 = Current Date
4567 - Random 4 digits
Thanks
Hello
I would like generate an order number with a Suffix and Prefix
Format is as follows: MFJ10062014567
MFJ = Prefix
10062021 = Current Date
4567 - Random 4 digits
Thanks
Would this work? or do you need a macro?
="MFJ"&TEXT(NOW(),"ddmmyyyy")&RANDBETWEEN(0,1000)
If you find the suggestion or solution helpful, please consider adding reputation to the post.
HI
Thanks for your response, appreciate a macro , thanks
change 1000 to 9999
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
I think you you will find that you will need to use a Macro.
What you want can be achieved using a formula ="MFJ" & TEXT(TODAY(),"ddmmyyyy")&TEXT(RANDBETWEEN(1,9999),"0000")
However you will need to check for duplicates so you will need to store all Invoice numbers and rerun the formula if you have a duplicate.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
I have created 2 routines in the attached, one is the macro alone and the other is a function so you can call it in a sheet
and have it return the number
In the attached on the sheet the function is used for your review.
HI
I downloaded sample you sent, and tried running macro, which does not seem to work.
Works perfectly...If you know how to use it...which does not seem to work.
Hi
Keyed in =RandorderNumber() in Cell F21 and getting #NAME? error
I just typed it in the file i upload in F21 and works
ive uploaded the same file with the function called in F21
Screenshot 2021-06-10 142349.jpg
Last edited by cubangt; 06-10-2021 at 03:24 PM.
Sorry guys.
You have made no effort to avoid duplicate Invoice numbers.
Please Login or Register to view this content.
HIO
My bad, it works, was typing in something incorrect initially . Thanks a million for you assistance , Sir
Regards
This will guarantee no duplicates are generated...
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks