使excel表格自动计算我持有股票的时间
时间:2023-11-09 09:30:02
从那年股市的大牛市开始,炒股的人越来越多了,昨天一个朋友问我说,他自己创建了一个自己持有股票的excel表格,来计算他的年利润,课时只能手动输入持有股票的时间达到目的想问下,有没有什么方法能在其中一列数据为购买日期的前提下,使excel表格自动计算我持有股票的时间?
首先我们假设单元格A2中数据是购买日期,在B2中输入:=DATEDIF(A2,TODAY(),“y”),在C2中输入:=DATEDIF(A2,TODAY(),“ym”),最后在D2中输入:=DATEDIF(A2,TODAY(),“md”),然后将单元格B2:D2的数字格式设为有效数字为个位数。如果A列输入的是购买日期,你只要将公式向B、C和D列下的单元格拖拽复制,即可得出相应的时间。其中B列给出的是年数,C列是月数,而D列是天数。
标签:持有,时间,的是,输入,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Excel 表格中文字过多显示#字符的解决办法介绍
2023-01-23 09:51:52
![](https://img.aspxhome.com/file/2023/3/42713_0s.png)
PPT怎么制作连线题动画效果的课件?
2023-01-18 14:58:45
![](https://img.aspxhome.com/file/2023/10/a349701_0s.jpg )
excel怎么绘制箱形图?excel2016中绘制一组数据的箱形图教程
2023-07-27 15:48:06
Win10蓝屏终止代码dpc怎么办?Win10蓝屏终止代码dpc解决方法
2023-07-17 13:43:05
![](https://img.aspxhome.com/file/2023/26/a220723_0s.jpg)
WPS表格快速将小写转换成大写数字的方法
2023-07-06 12:02:19
笔记本不能装win7进入正在启动Windows界面时死机
2023-11-27 11:43:57
![](https://img.aspxhome.com/file/2023/29/a255545_0s.gif)
Windows7系统下gpedit.msc无法运行怎么办?
2023-12-07 22:13:12
U盘有分区怎么办 多分区U盘合并分区的操作方法
2023-03-25 20:06:56
快速删除U盘内autorun.inf病毒的方法
2023-07-07 06:45:13
![](https://img.aspxhome.com/file/2023/3/a301861_0s.png)
用Word自动生成成绩通知单
2023-12-08 22:52:14
![](https://img.aspxhome.com/file/2023/5/20455_0s.jpg)
怎么将PDF转换成CAD图纸
2022-06-18 08:51:05
![](https://img.aspxhome.com/file/2023/9/a342622_0s.jpg)
Win11系统安装WSA(Android)教程
2022-04-12 08:18:41
![](https://img.aspxhome.com/file/2023/27/a237353_0s.png)
Win7屏幕刷新频率设置方法?
2022-04-18 22:38:52
![](https://img.aspxhome.com/file/2023/26/a228643_0s.png)
手机网络信号G、E、3G、1X、H、4G及LTE是什么意思?
2022-07-12 11:35:40
![](https://img.aspxhome.com/file/2023/6/a325314_0s.jpg)
Win7如何在记事本中快速添加当前时间
2022-07-01 11:23:26
![](https://img.aspxhome.com/file/2023/27/a233625_0s.jpg)
Excel如何插入条码控制项
2023-07-29 08:31:19
win10快速启动怎么设置 win10快速启动没有解决方法
2023-11-20 22:14:25
![](https://img.aspxhome.com/file/2023/3/a297905_0s.jpg)
win7电脑创建磁盘管理扩展分区的方法?
2023-10-23 12:38:18
![](https://img.aspxhome.com/file/2023/4/a307273_0s.jpg)
Windows XP已不再安全 Qbot病毒已感染50万台设备
2022-05-28 13:15:28
![](https://img.aspxhome.com/file/2023/29/a253517_0s.jpg)
如何解决Win7系统百度打不开首页的问题?
2022-09-24 22:18:19
![](https://img.aspxhome.com/file/2023/27/a232148_0s.jpg)