Please any one can help me in this, I need to fill the cells with one number and one char like this ("A6") with no repeat in vertical column,
if you can give me a vba code or any other things to do it, Thank you..
Please any one can help me in this, I need to fill the cells with one number and one char like this ("A6") with no repeat in vertical column,
if you can give me a vba code or any other things to do it, Thank you..
Just loop through any row, and generate random number and random character, something like this:
For i = 1 To row_limit
For j = 1 To column_limit
try_cell = CStr(Int((upperbound - lowerbound + 1) * Rnd + lowerbound)) & Random_char() 'generate random cell address
Do While True 'check if current 'cell' generated in row
before = try_cell
For w = 1 To j
If try_cell = shee1.Cells(i, w) Then 'means it already exits and need to generate again
try_cell = CStr(Int((upperbound - lowerbound + 1) * Rnd + lowerbound)) & Random_char()
Exit For
End If
Next
If before = try_cell Then 'only if not in row, move on
sheet1.Cells(i, j) = try_cell
Exit Do
End If
Loop
Next
Next
You can check how to generate random char here Random String & Number Generation access vba