Excel Forum

Excel Magic Trick 261: Random Num 1- 100 Not Divisible By 3

See how to create random numbers between 1 and 100 that are not divisible by 3 with a large array formula. See these functions in this video:
The INDEX function allows you to look for a value in an array and return it to a cell
The RAND function returns a random number between 0 and 1, out to 15 digits
The INT function takes the integer part of a number only (1.567 becomes 1 and -2.876 becomes -3)
The ROW function tells you what row a reference is in
The INDIRECT function converts a reference as text to a reference
Read about the question I posted to the Mr Excel Message Board
Also see how we copy VBA Excel code from the Mr Excel Message Board and Paste it into the VBA editor, Edit the code, and run the macro.

Got a Question? Ask it Here in the Forum.