Random single letter/digit grid

rtrnow61

New Member
Joined
Jan 1, 2019
Messages
22
Hi,

Based on Mr. Excel's YouTube video showing how to create a random non-repeating letter grid I was wondering if anyone could help me create a random single letter or number grid for 26 letters of the alphabet by the number 0-9

Example: say A-Z are the columns and 0-9 are the rows and then I can generate a random letter or number (I would like the random generation to include both random letters A-Z and numbers 0-9) and non-repeating if possible.

I am an Excel novice and have a very specific use for this to create a secret number code corresponding to pricing. The non-repeat is not required but random is.

Thank you very much for any and all assistance.
 
Hi Rick,

I added the 2 functions to the Decimal macro and when I put the given formula in a blank cell, either one, I get back this message: Ambiguous Name Detected: GetCode or GetPrice depending on which formula I use.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi Rick,

I added the 2 functions to the Decimal macro and when I put the given formula in a blank cell, either one, I get back this message: Ambiguous Name Detected: GetCode or GetPrice depending on which formula I use.

That means you have two functions in one or more modules with the same name and VB does not know which one to run. Did you copy/paste my functions twice? If so, remove the first one you posted.
 
Upvote 0
Hi Rick,

I apologize up front for my ignorance. I am very much an Excel novice. Yes, I did have your two functions pasted more than once.

I now have it pasted in the macro/module with the decimal macro only. So, there is your macro, the added original function that was with the decimal macro and now the two additional functions all in the same place. When I type for example: +GetCode("45.00","G") I now get: #VALUE !
 
Upvote 0
I now have it pasted in the macro/module with the decimal macro only. So, there is your macro, the added original function that was with the decimal macro and now the two additional functions all in the same place. When I type for example: +GetCode("45.00","G") I now get: #VALUE !

While I don't think it matters, Excel convention is to start formulas with an equal sign, not a plus sign.

As for your error... you have the arguments in the wrong order. The header for the function is this...

Function GetCode(Letter As String, Amount As String) As String

note that the first argument is the column letter and the second argument is the amount.... you have them reversed.
 
Upvote 0
While I don't think it matters, Excel convention is to start formulas with an equal sign, not a plus sign.

As for your error... you have the arguments in the wrong order. The header for the function is this...

Function GetCode(Letter As String, Amount As String) As String

note that the first argument is the column letter and the second argument is the amount.... you have them reversed.

My mistake Rick, I was using =, the + was a typo in my last message to you.

I reversed the argument as you said I should and it works! You were correct in that the two additional functions will make things easier down the road. I appreciate that you included them.

I want you to know that what you have helped me with and given/shown me, is far more than I expected.

Thank you very much! This will be extremely helpful.

Take care,

Rod
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,038
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top