填写两列随机日期 [英] Fill two columns with random dates

查看:110
本文介绍了填写两列随机日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在Excel中生成10000个随机日期。我找到一些网站来做,但问题是我需要填写两列(提货日期,退货日期)。

如何在他们之间协调返回日期必须大于取货日期?
Excel中是否有任何网站或功能?

解决方案

您可以使用 RANDBETWEEN 函数生成特定范围之间的日期,例如:

  = RANDBETWEEN(DATE 1,1),DATE(2014,1,26))

然后,在第二列中,使用第一列中的值作为日期下限,例如:

  = RANDBETWEEN(A1,DATE(2015,1,1 )

请注意, RANDBETWEEN 是一个数字,它是Excel的基础日期表示,因此您需要将输出单元格格式化为日期。


I have to generate 10000 random dates in Excel. I found some website to do that, but the problem is I need fill out two columns ( pickup date, return date).
How can I coordinate between them where return date must be greater than pickup date? Is there any website or functions in Excel to do it?

解决方案

You can use the RANDBETWEEN function to generate dates between a certain range e.g.:

 =RANDBETWEEN(DATE(2014,1,1),DATE(2014,1,26))

Then, in the second column, use the value in the first column as the date lower bound e.g.:

 =RANDBETWEEN(A1,DATE(2015,1,1))

Note that the output of RANDBETWEEN is a number that is Excel's underlying date representation, therefore you need to format the output cells as a date.

这篇关于填写两列随机日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆