{"id":2755,"date":"2023-01-09T21:31:35","date_gmt":"2023-01-09T21:31:35","guid":{"rendered":"https:\/\/www.bizinfograph.com\/resource\/?p=2755"},"modified":"2024-03-01T16:37:53","modified_gmt":"2024-03-01T16:37:53","slug":"how-to-generate-random-number-in-excel","status":"publish","type":"post","link":"https:\/\/www.bizinfograph.com\/resource\/how-to-generate-random-number-in-excel\/","title":{"rendered":"How to Generate Random Number in Excel?"},"content":{"rendered":"<p>Generate Random Number in Excel to enhance your data analysis, simulation models, and decision-making processes. This versatile function opens up a world of possibilities, from creating unbiased samples to developing complex financial models. By incorporating randomness into your Excel projects, you can simulate various scenarios, improve security measures, and ensure fair and unbiased data distribution. Embrace the power of Excel&#8217;s random number generation to bring objectivity and innovation to your spreadsheets, making your analyses more robust and your conclusions more reliable.<\/p>\n<p><strong>This Content Covers:<\/strong><\/p>\n<ol>\n<li><a href=\"#generate-random-numbers-using-the-rand-function\"><strong> Generate Random Numbers using the RAND function<\/strong><\/a><\/li>\n<li><a href=\"#generate-random-numbers-using-the-randbetween-function\"><strong> Generate Random Numbers using the RANDBETWEEN Function<\/strong><\/a><\/li>\n<li><a href=\"#generate-random-numbers-with-the-data-analysis-tool\"><strong> Generate Random Numbers with the Data Analysis tool<\/strong><\/a><\/li>\n<li><a href=\"#generate-random-numbers-with-vba\"><strong> Generate Random Numbers with VBA<\/strong><\/a><\/li>\n<\/ol>\n<h2><strong id=\"generate-random-numbers-using-the-rand-function\">1. Generate Random Numbers using the RAND function<\/strong><\/h2>\n<p>A decimal number between 0 and 1 is produced randomly by the <strong>RAND <\/strong>function.<\/p>\n<p><strong>Step 1:<\/strong> Select a cell, enter the formula given below and hit <strong>ENTER.<\/strong><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-2631\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-1.png\" alt=\"Generate Random Number\" width=\"657\" height=\"272\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-1.png 657w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-1-300x124.png 300w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/p>\n<p><strong>Step 2:<\/strong> To get a list of random number just click and drag the lower right corner of that cell.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-2632\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-2.png\" alt=\"Generate Random Number\" width=\"464\" height=\"286\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-2.png 464w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-2-300x185.png 300w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/p>\n<p><strong>Step 3:<\/strong> The value in the first cell has changed because every time a cell on the sheet is calculated, new random numbers are generated. To prevent this just copy the random numbers using <strong>CTRL+C<\/strong> and right click on the cell you want to paste and paste them as <strong>Values<\/strong>. The formula bar now holds a value and not the <strong>RAND<\/strong> function.<\/p>\n<h2><img decoding=\"async\" class=\"aligncenter size-full wp-image-2633\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-3.png\" alt=\"Generate Random Number\" width=\"433\" height=\"286\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-3.png 433w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-3-300x198.png 300w\" sizes=\"(max-width: 433px) 100vw, 433px\" \/><strong id=\"generate-random-numbers-using-the-randbetween-function\" style=\"font-size: 16px;\">2. Generate Random Numbers using the RANDBETWEEN Function<\/strong><\/h2>\n<p>The RANDBETWEEN function produces a random whole number between two limits.<\/p>\n<p><strong>Step 1<\/strong>: Choose a cell, type the formula below, then press <strong>Enter.<\/strong><\/p>\n<p><strong>= RANDBETWEEN ( bottom, top )<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2634\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-4.png\" alt=\"Generate Random Number\" width=\"429\" height=\"184\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-4.png 429w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-4-300x129.png 300w\" sizes=\"(max-width: 429px) 100vw, 429px\" \/><\/p>\n<p><strong>Step 2<\/strong>: Modify the RAND function as follows to get random decimal values between 30 and 55.<\/p>\n<p><strong>=bottom+(top-bottom)*RAND()<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2635 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-5.png\" alt=\"Generate Random Number in Excel\" width=\"535\" height=\"196\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-5.png 535w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-5-300x110.png 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/p>\n<h2><strong id=\"generate-random-numbers-with-the-data-analysis-tool\">3. Generate Random Numbers with the Data Analysis tool<\/strong><\/h2>\n<p><strong>Step 1:<\/strong> Select <strong>Data&gt;&gt;Data Analysis.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2636 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-6.png\" alt=\"Generate Random Number in Excel\" width=\"631\" height=\"171\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-6.png 631w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-6-300x81.png 300w\" sizes=\"(max-width: 631px) 100vw, 631px\" \/><\/p>\n<p><strong>Step 2:<\/strong> From <strong>Data Analysis<\/strong> dialogue box Select <strong>Random Number Generation<\/strong> and hit <strong>OK.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2637 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-7.png\" alt=\"Generate Random Number in Excel\" width=\"495\" height=\"260\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-7.png 495w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-7-300x158.png 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/p>\n<p><strong>Step 3: <\/strong>From <strong>Random number Generation<\/strong> dialogue box select <strong>Uniform<\/strong> in <strong>Distribution box,<\/strong> then set the top and bottom value inside the boxes labeled as <strong>Between.<\/strong> Select the <strong>Output Range <\/strong>box option and select the cell you want to put the random number in and hit <strong>OK.<\/strong><\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2638 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-8.png\" alt=\"Generate Random Number in Excel\" width=\"486\" height=\"517\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-8.png 486w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-8-282x300.png 282w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><strong id=\"generate-random-numbers-with-vba\" style=\"font-size: 16px;\">4. Generate Random Numbers with VBA<\/strong><\/h2>\n<p>Generating random numbers using VBA is a bit complex process.<\/p>\n<p><strong>Step 1:<\/strong> Right click on your current worksheet and select <strong>View Code.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2639 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-9.png\" alt=\"Generate Random Number in Excel\" width=\"307\" height=\"310\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-9.png 307w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-9-297x300.png 297w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-9-150x150.png 150w\" sizes=\"(max-width: 307px) 100vw, 307px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Insert the formula given below inside the VBA module dialogue box and click <strong>RUN.<\/strong><\/p>\n<p><strong>Sub RandomNumber()<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0 MsgBox Rnd()<\/strong><\/p>\n<p><strong>End Sub<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2640 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-10.png\" alt=\"Generate Random Number in Excel\" width=\"543\" height=\"332\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-10.png 543w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-10-300x183.png 300w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/p>\n<p><strong>Step 3: <\/strong>After you hit the RUN a dialogue box will appear consisting of a random number.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2641\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-11.png\" alt=\"Generate Random Number\" width=\"347\" height=\"305\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-11.png 347w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Generate-Random-Number-11-300x264.png 300w\" sizes=\"(max-width: 347px) 100vw, 347px\" \/><\/p>\n<h2><strong>Application of Generate Random Number in Excel<\/strong><\/h2>\n<ul>\n<li><strong>Data Simulation<\/strong>: Use the RAND or RANDBETWEEN function to create random datasets for statistical analysis, modeling, or testing hypotheses in scenarios where real data is not available.<\/li>\n<li><strong>Sample Selection<\/strong>: Generate random numbers to randomly select samples from a larger dataset for surveys, audits, or quality control checks to ensure unbiased sampling.<\/li>\n<li><strong>Password Generation<\/strong>: Create strong, random passwords or codes by generating a random string of numbers (and letters), enhancing security for systems or encrypted files.<\/li>\n<li><strong>Scenario Analysis<\/strong>: Utilize random numbers to simulate different financial or business scenarios, such as revenue forecasts, investment returns, or risk assessments, aiding in decision-making processes.<\/li>\n<li><strong>Game Development<\/strong>: Employ random numbers to design game elements, such as dice rolls, random events, or character attributes, making gameplay more dynamic and unpredictable.<\/li>\n<li><strong>Random Assignment<\/strong>: Assign participants or items to different groups or conditions randomly in experiments or studies to prevent bias and ensure a fair distribution.<\/li>\n<\/ul>\n<div class=\"elementor-element elementor-element-3db31e1 elementor-widget elementor-widget-theme-post-content\" data-id=\"3db31e1\" data-element_type=\"widget\" data-widget_type=\"theme-post-content.default\">\n<div class=\"elementor-widget-container\">\n<p>You may be interested:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Finance\" target=\"_blank\" rel=\"noopener\">Financial Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Sales\" target=\"_blank\" rel=\"noopener\">Sales Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Human-Resource\" target=\"_blank\" rel=\"noopener\">HR Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.executiveknowledge.org\/dashboard-templates\/35\" target=\"_blank\" rel=\"noopener\">Data Visualization Charts<\/a><\/li>\n<\/ol>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Generate Random Number in Excel to enhance your data analysis, simulation models, and decision-making processes. This versatile function opens up a world of possibilities, from creating unbiased samples to developing complex financial models. By incorporating randomness into your Excel projects, you can simulate various scenarios, improve security measures, and ensure fair and unbiased data distribution. &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.bizinfograph.com\/resource\/how-to-generate-random-number-in-excel\/\"> <span class=\"screen-reader-text\">How to Generate Random Number in Excel?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[326],"tags":[328,327],"class_list":["post-2755","post","type-post","status-publish","format-standard","hentry","category-generate-random-number","tag-generate-random-number","tag-generate-random-number-in-excel"],"_links":{"self":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/comments?post=2755"}],"version-history":[{"count":4,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2755\/revisions"}],"predecessor-version":[{"id":8686,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2755\/revisions\/8686"}],"wp:attachment":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/media?parent=2755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/categories?post=2755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/tags?post=2755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}