Best way to 'bound' a lognormal random draw

dr_gzus

New Member
Joined
Sep 15, 2010
Messages
28
Hi everyone, thanks for being there!

I'm trying to create a lognormal distribution random draw but I can't have the draw be less than 1. Basically 1 and above, instead of the typical 0 and above. If I use an 'if' statement to default to 1 if the draw is less than 1, I get waaaay more 1's than I should, so the resulting distribution is bubkus. Any thoughts?
 
Okay got it on the formula, and thanks big time for your help, but I'm still getting a #REF! error.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Where did you paste the code?

Did you copy it all?

EDIT: And the function name is NLT1 (as in Not Less Than 1)
 
Upvote 0
Your version works. My spreadsheet does not. Same code. I'm noticing that my spreadsheet capitalizes and blue-highlights =NLTI( while yours remains =nlt1(

Is there a setting I might need to tweak somewhere?
 
Upvote 0
Dunno. Put your workbook on a friendly file sharing site and post a link.
 
Upvote 0
Confidential info. No can do. But thanks for all of your help, I'll try to figure out what's going on from here. If yours works I'm sure I can figure out what to do with mine. As soon as I get it worked out it will be just what I need.

Just out of curiosity, I assume the same VBA code could be tweaked to not return a number less than x if I had a different base case, right?

Thanks in advance, I'm off to lunch!
 
Upvote 0

Forum statistics

Threads
1,224,800
Messages
6,181,042
Members
453,014
Latest member
Chris258

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