菜单
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Excel 教程

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Table Pivot

Table Pivot Intro

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS IF IFS LEFT LOWER MAX MEDIAN MIN MODE NPV OR RAND RIGHT STDEV.P STDEV.S SUM SUMIF SUMIFS TRIM VLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Examples

Excel Exercises Excel Certificate

Excel References

Excel Keyboard Shortcuts


Excel RAND 函数


RAND 函数

RAND 函数用于生成随机数。

输入方式为 =RAND

Rand 可以用来生成任何随机数。

您可以定义范围、创建随机数据集等等。

要使用默认的 RAND 函数,请键入:

=RAND()

要使用 RAND 函数生成一个最大值为特定值的随机数,请键入:

=RAND()*

要使用 RAND 函数生成一个整数,请键入:

=INT(RAND())

如何使用 RAND 函数

要获得一个随机数,请使用 RAND

步骤 1) 启动 RAND 函数
  1. 选择单元格 A1
  2. 键入 =RAND
  3. 双击 RAND 命令

步骤 2) 关闭函数
  1. 使用 ()) 关闭函数
  2. 按 Enter 键

随机数已生成!


如何使用 RAND 函数并定义上限值。

  1. 定义上限 (*10)
  2. 按 Enter 键

已生成一个介于 0 和 10 之间的随机数!


如何使用 RAND 函数获取整数。

  1. RAND 函数前添加 (INT)
  2. 按 Enter 键

已生成一个介于 0 和 10 之间的随机整数!


如何生成多个随机数。

  1. 拖动单元格右下角向下即可生成更多数字。

A 列中生成了 10 个随机数!



×

联系销售

如果您想将 W3Schools 服务用于教育机构、团队或企业,请发送电子邮件给我们
sales@w3schools.com

报告错误

如果您想报告错误,或想提出建议,请发送电子邮件给我们
help@w3schools.com

W3Schools 经过优化,旨在方便学习和培训。示例可能经过简化,以提高阅读和学习体验。教程、参考资料和示例会不断审查,以避免错误,但我们无法保证所有内容的完全正确性。使用 W3Schools 即表示您已阅读并接受我们的使用条款Cookie 和隐私政策

版权所有 1999-2024 Refsnes Data。保留所有权利。W3Schools 由 W3.CSS 提供支持