列出给定列的每日运行计数的公式 [英] Formula for tabulating daily running counts of a given column

查看:61
本文介绍了列出给定列的每日运行计数的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个公式,该公式在给定的一天中给出问题的连续计数.换句话说:输出应枚举给定日期的每个 Issue (如果 Issue 为空白,则返回空白),然后在随后的第一个问题中再次从1开始日期.

I'm trying to write a formula that gives a running count of Issues for a given day. In other words: the output should enumerate each Issue for a given date (returning blank if Issue is blank), and then start again at 1 for the first issue in a subsequent date.

我已经将期望的输出硬编码到期望的输出"中.列( I 列):

I've hard-coded the expected outputs in the "desired output" column (column I):

示例数据集位于此工作表中.关键片段:

Sample dataset is in this sheet. Key pieces:

  • B 包含日期
  • E 列包含每个Issue的T恤尺寸严重程度
  • F 包含列 E
  • 的数字转换
  • G 包含是否存在问题的二进制输出
  • Column B contains the date
  • Column E contains the T-shirt size severity of each Issue
  • Column F contains a numerical translation of column E
  • Column G contains a binary output of whether there was an Issue

我的尝试(列 J )中,我已经接近使用

In my attempt (column J), I've gotten close using

=ArrayFormula(MMULT((ROW($B3:$B)>=TRANSPOSE(ROW($B3:$B))) * EXACT($B3:$B,TRANSPOSE($B3:$B))^1, ($G3:$G)^1))

...但这并不是我想要的,因为:

...but it's not quite what I want, as:

  1. 这是重复值,而不是空格(例如,第8、11行)
  2. 这给出0而不是空格(例如第3、4行)

请参见验证(列 L ).

关于如何找到想要的东西的任何想法?

Any ideas on how to get to what I'm looking for?

推荐答案

只需将公式包装在 IF 函数

=ArrayFormula(IF(F3:F="",,YOUR.....FORMULA))

换句话说

=ArrayFormula(IF(F3:F="",, 
                   MMULT((ROW($B3:$B)>=TRANSPOSE(ROW($B3:$B))) * EXACT($B3:$B,TRANSPOSE($B3:$B))^1, ($G3:$G)^1) 
                      ))

这篇关于列出给定列的每日运行计数的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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