You don't own a d27? For shame!!!
Just roll a d30 and drop results above 27. For a while I had that table set to a nice even die multiple but had a hard time self-editing when I had more good ideas for spells!
Also, note the bit on what to do if a wizard gets a useless selection of spells. It's in the section on randomly determining spells. It happened to me in actual play once...while "random spells" sounds great in theory, the player with four spells with absolutely no application to the adventure at hand does not have fun!