  Register To Reply

.
Paste into a regular module. ``Please Login or Register  to view this content.``  Register To Reply

you posted in vba, so i'll give a vba solution. though this can be done using formulas as well. hard to tell for 1 ID, but the pattern i see is 4 digits, single alphabet or a permanent "F", 3 digits, dash, 2 digits, 1 alphabet or a permanent "D", 1 digit or zero, etc

to randomize numbers, there's a function RANDBETWEEN. since it's 4 digits, randomize between 1 and 9999. you don't want just 1 to appear but 0001. so use FORMAT (TEXT in Excel) to show 4 digits.
to randomize alphabets, there's a certain character code for each of them. you can find out through Excel via:
=CODE("A")
to combine them, use ampersand (&)
you'll see 65 shown. Z would be 90. CHR (CHAR in Excel) to choose the code. so CHR(RANDBETWEEN(65 and 90)).
something along this for the first part: ``Please Login or Register  to view this content.``
=TEXT(RANDBETWEEN(1,9999),"0000")&"-"&CHAR(RANDBETWEEN(65,90))&TEXT(RANDBETWEEN(1,999),"000")

you can continue with the rest  Register To Reply

Thanks Logit and benishiryo for your efforts.

I did end up finding this formula to work instead:

=CONCATENATE(DEC2HEX(RANDBETWEEN(0,4294967295),8)," ",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,42949),4),"-",DEC2HEX(RANDBETWEEN(0,4294967295),8),DEC2HEX(RANDBETWEEN(0,42949),4))  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 