In the case of a continuous variable, it's not all that hard to "roll your own" generating function.
Start with the variable's Probability Density Function, PDF(x), and construct its corresponding Cumulative Distribution Function, CDF(x):
CDF(x) = Integral of PDF(x) with respect to x from negative infinity to x. This CDF will monotonically increase from 0 at negative infinity to 1 at positive infinity.
In many cases you will already have a formula for the CDF, and in cases where you do not have it you can probably construct an adequate piecewise-linear approximation to it.
Once you have the CDF, you have what is, in effect, a transformation between a uniform distribution over (0,1) and your required PDF. And Excel's RAND() function generates the former. What you are actually going to use is the mathematical inverse of this CDF.
Graphically what you must do programatically is:
(1) Use RAND() to generate a random number between zero and one.
(2) Mark this value as the ordinate of your CDF.
(3) Construct a horizontal line at that ordinate value, and intersect it with the CDF curve.
(4) Read off the abscissa value that corresponds to the intersection point.
(5) The set of abcissa values so generated will be distributed according to your initial PDF.
HTH