当前位置:网站首页>Excel Advanced Drawing Skills 100 Lectures (23) - Countdown Counting in Excel
Excel Advanced Drawing Skills 100 Lectures (23) - Countdown Counting in Excel
2022-08-10 03:31:00 【Getullo Book】
As shown in the figure below, it is part of the vehicle transportation form of a courier company.Where column F is the planned arrival time, I hope to get the following effect in column G:
If the scheduled arrival time is earlier than the system time, the remaining time is displayed.
If the planned arrival time is later than the system time, the words "Timeout xx hours xx minutes" will be displayed.
To solve this problem, let's sort out our ideas first:
1. To get the current time of the system, you need to use the NOW function.
2. Use NOW() to subtract the time in column F to calculate the time difference.
3. With the help of the TEXT function, the positive number after subtraction is displayed as time, and the negative number after subtraction is displayed as "timeout xx hours xx minutes".
It looks simple, let's try it.
Enter the following formula in cell G2, drop down.
=TEXT(F2-NOW(),"h:mm:ss;timeout h:mm:ss")
The second parameter of the TEXT function uses two format codes. The h:mm:ss before the semicolon corresponds to the format of the positive number application, and h:mm:ss is "hour:minute:second".
The "timeout h:mm:ss" after the semicolon corresponds to the format of the negative number application, that is, the word "timeout" is added before the "hours, minutes and seconds".
However, starting from cell G3, the formula returns the wrong value. What's the reason?
By default, Excel does not support negative time or negative date, so when the time in column F is earlier than the current system time, the two are subtracted to a negative number, common
边栏推荐
猜你喜欢
随机推荐
【二叉树-困难】124. 二叉树中的最大路径和
QT中,QTableWidget 使用示例详细说明
what is a microcontroller or mcu
The 25th day of the special assault version of the sword offer
【二叉树-中等】1379. 找出克隆二叉树中的相同节点
ECCV 2022 Oral | CCPL: 一种通用的关联性保留损失函数实现通用风格迁移
【红队】ATT&CK - 自启动 - 注册表运行键、启动文件夹
Write a drop-down refresh component
2022.8.8考试游记总结
2022.8.9考试平衡的余数--1000题解
量化交易策略介绍及应用市值中性化选股
芯片加速器 Accelerator
2022.8.9考试游记总结
On the Harvest of Travel
浅写一个下拉刷新组件
【8.8】代码源 - 【不降子数组游戏】【最长上升子序列计数(Bonus)】【子串(数据加强版)】
storage of data in memory
Pagoda server PHP+mysql web page URL jump problem
mysql -sql编程
程序员的专属浪漫——用3D Engine 5分钟实现烟花绽放效果