caccarazza

New Member
Joined
Jun 23, 2019
Messages
5
Good morning,
I'm trying to do a schulte table 3x3 with random 5 alphanumeric.
Can you help me pls ? I need to see this table for just 1 second and then after 7 seconds another one with random positions, the numers are from 1 to 9 and the letters from A to Z.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

Below should work, sometimes it might give a duplicate value. For refreshing, you can press F9 key. If you need auto-refresh VBA code needs to be written for that as far as I know. You can refer to the below 2 links:

https://www.exceltip.com/tips/auto-refresh-excel-every-1-second-using-vba-in-excel.html

https://www.mrexcel.com/forum/excel-questions/362595-auto-refresh-every-3-minutes-using-macro.html

Sheet1

Worksheet Formulas
CellFormula
A1=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
B1=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
C1=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
A2=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
B2=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
C2=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
A3=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
B3=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)
C3=VLOOKUP(RANDBETWEEN(1,35),$F$1:$G$35,2,FALSE)

<tbody>
</tbody>

<tbody>
</tbody>


FG
111
222
333
444
555
666
777
888
999
1010A
1111B
1212C
1313D
1414E
1515F
1616G
1717H
1818I
1919J
2020K
2121L
2222M
2323N
2424O
2525P
2626Q
2727R
2828S
2929T
3030U
3131V
3232W
3333X
3434Y
3535Z

<tbody>
</tbody>

 
Last edited:
Upvote 0
Does this do what you are looking for?

Code:
Sub Shulte()
Dim AR(1 To 3, 1 To 3)
Dim AL As Object: Set AL = CreateObject("System.Collections.ArrayList")
Dim Board As Range
Dim r As Integer, Rounds As Integer

Set Board = Range("A1").Resize(UBound(AR), UBound(AR, 2))
For Rounds = 1 To 10
    For i = 65 To 90
        If i < 65 + (UBound(AR) * UBound(AR, 2)) Then AL.Add i - 64
        AL.Add Chr(i)
    Next i
    For j = 1 To UBound(AR)
        For k = 1 To UBound(AR, 2)
            r = Int((AL.Count - 1) * Rnd + 1)
            AR(j, k) = AL(r)
            AL.Removeat r
        Next k
    Next j
        
    Board.Font.ColorIndex = 0
    Board.Value = AR
    Application.Wait Now() + TimeValue("0:00:01")
    Board.Font.ColorIndex = 2
    Application.Wait Now() + TimeValue("0:00:07")
    AL.Clear
    DoEvents
Next Rounds
End Sub
 
Last edited:
Upvote 0
Irobbo314 your vb is ok, but i just need 5 alphanumerical and not 9 as random....
for the orther one I'm trying but it's more complicate for me
 
Upvote 0
I don’t know what you mean. Can you post an example or explain in more detail?
 
Upvote 0
d2RpXGP
I don’t know what you mean. Can you post an example or explain in more detail?
d2RpXGP

I'm trying to put the screenshot here, I give you the link https://ibb.co/d2RpXGP

I jus need a table 3x3 with 5 random alphanumerical numbers or letters
 
Upvote 0
Ok, how about this?

Code:
Sub Shulte()
Dim AR(1 To 3, 1 To 3)
Dim AL As Object: Set AL = CreateObject("System.Collections.ArrayList")
Dim SQ As Object: Set SQ = CreateObject("System.Collections.ArrayList")
Dim Board As Range
Dim r As Integer, Rounds As Integer


Set Board = Range("A1").Resize(UBound(AR), UBound(AR, 2))
For Rounds = 1 To 10
    For i = 65 To 90
        If i < 65 + (UBound(AR) * UBound(AR, 2)) Then
            AL.Add i - 64
            SQ.Add i - 64
        End If
        AL.Add Chr(i)
    Next i
    For j = 1 To UBound(AR)
        For k = 1 To UBound(AR, 2)
            r = Int((AL.Count - 1) * Rnd + 1)
            AR(j, k) = AL(r)
            AL.removeat r
        Next k
    Next j


        
    Board.Font.ColorIndex = 0
    Board.Value = AR
    For l = 1 To 4
        r = Int((SQ.Count - 1) * Rnd + 1)
        Board.Cells(SQ(r)).ClearContents
        SQ.removeat r
    Next l
    Application.Wait Now() + TimeValue("0:00:01")
    Board.Font.ColorIndex = 2
    Application.Wait Now() + TimeValue("0:00:07")
    AL.Clear
    DoEvents
Next Rounds
End Sub
 
Upvote 0
yes, thank you very much, it is perfect now, ok the numbers are less cause are fm 1 to 9 and the alphabet from A to Z, but it's ok.... many thanks
 
Upvote 0
If it’s an issue, I can amend to code to have a more even distribution, but if it’s good as is, then I’m glad it works for you. Good luck on the speed reading.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,602
Members
449,089
Latest member
Motoracer88

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