ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 941|回复: 0

[求助] 求助:开始欠货日期计算

[复制链接]

TA的精华主题

TA的得分主题

发表于 2018-3-7 14:51 | 显示全部楼层 |阅读模式
本帖最后由 天边。。。 于 2018-3-8 08:19 编辑

开始欠货日期计算.png

以库存依次扣减需求数量,直到出现负数,并返回出现负数这一列的日期,具体如附件表格,请各位老师解答,感谢!

以下是目前使用的公式,运行效率非常低,希望能有更方便更简洁的方式
"=IF($I2-SUM(OFFSET($U2,,1,,(MATCH("(到货通知单数量)逾期数量",$V$1:$CI$1,0)-1)))>=0,"到"&MID(OFFSET($U$1,,(MATCH("(到货通知单数量)逾期数量",$V$1:$CI$1,0)-1)),13,6)&"不欠",IF($I2<SUM(OFFSET($U2,,1)),MID(OFFSET($U$1,,1),13,6),IF($I2<SUM(OFFSET($U2,,1,,2)),MID(OFFSET($U$1,,2),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,3)),MID(OFFSET($U$1,,3),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,4)),MID(OFFSET($U$1,,4),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,5)),MID(OFFSET($U$1,,5),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,6)),MID(OFFSET($U$1,,6),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,7)),MID(OFFSET($U$1,,7),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,8)),MID(OFFSET($U$1,,8),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,9)),MID(OFFSET($U$1,,9),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,10)),MID(OFFSET($U$1,,10),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,11)),MID(OFFSET($U$1,,11),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,12)),MID(OFFSET($U$1,,12),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,13)),MID(OFFSET($U$1,,13),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,14)),MID(OFFSET($U$1,,14),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,15)),MID(OFFSET($U$1,,15),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,16)),MID(OFFSET($U$1,,16),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,17)),MID(OFFSET($U$1,,17),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,18)),MID(OFFSET($U$1,,18),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,19)),MID(OFFSET($U$1,,19),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,20)),MID(OFFSET($U$1,,20),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,21)),MID(OFFSET($U$1,,21),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,22)),MID(OFFSET($U$1,,22),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,23)),MID(OFFSET($U$1,,23),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,24)),MID(OFFSET($U$1,,24),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,25)),MID(OFFSET($U$1,,25),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,26)),MID(OFFSET($U$1,,26),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,27)),MID(OFFSET($U$1,,27),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,28)),MID(OFFSET($U$1,,28),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,29)),MID(OFFSET($U$1,,29),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,30)),MID(OFFSET($U$1,,30),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,31)),MID(OFFSET($U$1,,31),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,32)),MID(OFFSET($U$1,,32),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,33)),MID(OFFSET($U$1,,33),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,34)),MID(OFFSET($U$1,,34),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,35)),MID(OFFSET($U$1,,35),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,36)),MID(OFFSET($U$1,,36),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,37)),MID(OFFSET($U$1,,37),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,38)),MID(OFFSET($U$1,,38),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,39)),MID(OFFSET($U$1,,39),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,40)),MID(OFFSET($U$1,,40),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,41)),MID(OFFSET($U$1,,41),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,42)),MID(OFFSET($U$1,,42),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,43)),MID(OFFSET($U$1,,43),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,44)),MID(OFFSET($U$1,,44),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,45)),MID(OFFSET($U$1,,45),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,46)),MID(OFFSET($U$1,,46),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,47)),MID(OFFSET($U$1,,47),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,48)),MID(OFFSET($U$1,,48),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,49)),MID(OFFSET($U$1,,49),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,50)),MID(OFFSET($U$1,,50),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,51)),MID(OFFSET($U$1,,51),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,52)),MID(OFFSET($U$1,,52),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,53)),MID(OFFSET($U$1,,53),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,54)),MID(OFFSET($U$1,,54),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,55)),MID(OFFSET($U$1,,55),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,56)),MID(OFFSET($U$1,,56),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,57)),MID(OFFSET($U$1,,57),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,58)),MID(OFFSET($U$1,,58),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,59)),MID(OFFSET($U$1,,59),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,60)),MID(OFFSET($U$1,,60),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,61)),MID(OFFSET($U$1,,61),13,6)*1,IF($I2<SUM(OFFSET($U2,,1,,62)),MID(OFFSET($U$1,,62),13,6)*1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))"

开始欠货日期计算.rar

7.93 KB, 下载次数: 10

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-12-27 20:03 , Processed in 0.037882 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表