如何计算客户的重复率? (如果包含名称的列中的任何一行对应于特定值。

发布于 2025-01-22 04:20:18 字数 1206 浏览 0 评论 0原文

我有一系列交易清单(通常是未分类的),我正在尝试找出公司是每年的新客户还是重复客户(2019年,2020年,& 2021)。

数据的存在如下:

公司年度
公司12019
Company 22019
Company 22020
Company 22020
Company 22020
Company 32020
Company 3 2020 Company 22021
Company 42021

我需要计算为:

公司2019年2019 20202021
Company 1NewLostLost
Lost Lost Lost Lost Most公司2新的重复重复
公司3-丢失
公司4--

通过创建几个助手列创造了预期的结果,但是如果没有这些,我如何获得结果呢?您可以在此处查看当前工作:

1425919264 在使用index Match或vookup匹配方面努力努力如果[公司名称]首次在2019年签署,则,并且包含[公司名称]的A列中的任何行都对应于2020 ,则[Company Name]是“重复” else

。感谢。

I have a list of deals (usually unsorted) and I'm trying to find out if a company is a new client or a repeat client for each year (2019, 2020, & 2021).

The data is present as follows:

CompanyYear
Company 12019
Company 22019
Company 22020
Company 22020
Company 32020
Company 32020
Company 22021
Company 42021

I need it to be calculated as:

Company201920202021
Company 1NewLostLost
Company 2NewRepeatRepeat
Company 3-NewLost
Company 4--New

I've created the desired outcome by creating a couple of helper columns, but how do I get the outcome without those? You can view the current work here: https://docs.google.com/spreadsheets/d/1jRTb1X4mFpLqyqADayqame-jWe2LoFizmARc7OCF424/edit#gid=1425919264

Struggling with using INDEX MATCH or VLOOKUP, specifically -> If [Company Name] is first signed in 2019, and any row in Column A containing [Company Name] corresponds to 2020, then [Company Name] is "Repeat" else....

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

魄砕の薆 2025-01-29 04:20:18

在传统excel中,必须将其作为数组公式输入

在Google表中(假设相同的单元格引用),则还必须显式阵列方面,即ie

= arrayformula(if(iSNA(iSNA)(匹配($ d2& e $ 1,$ a,$ a,$ a) $ 2:$ a $ 9& $ b $ 2:$ b $ 9,0)),如果(或(d2 =“ new”,d2 =“丢失”),“丢失”,“ - ”),if(or(d2) =“ new”,d2 =“重复”),“重复”,“ new”))))))

In legacy Excel, this must be entered as an array formula
Excel screenshot showing CSE formula producing desired results

In Google sheets (assuming the same cell references) then the array aspect must also be made explicit, i.e.

=ARRAYFORMULA(IF(ISNA(MATCH($D2&E$1,$A$2:$A$9&$B$2:$B$9,0)),IF(OR(D2="New",D2="Lost"),"Lost","-"),IF(OR(D2="New",D2="Repeat"),"Repeat","New")))

别靠近我心 2025-01-29 04:20:18

过滤器是您的朋友

在单独的纸上,在单元A1中作为标题,让您放置该单词的公司,在b1中让我们放置状态。 “标题的图片”

现在在cell a2 plot中)获取独特的公司名称列表。假设您的公司名称在A列,并从第二行开始。

在下一部分之前,让这一年放在纸上的某个地方。让我们在细胞D1中进行操作,并在细胞C1中的左侧进行键入“年”以进行澄清。

现在在Cell B2中:B1000 put = if(a2 =“”,,if(index(satch(segch1!$ a $ 2:$ 2:$ b,sheet1)!$ a $ 2:$ 2:$ a = a2),2,false),1,2)> = $ d $ 1,如果(countif(Sheet1!$ a $ 2:$ 2:$ a,a2)> 1,“重复”,“ new”),“丢失”))

我们基本上是在说该公式左侧的单元格不是空白的,并且最新的条目大于或等于我在D1中放置的年份,那么我想看看这是否是第一个是时候我们在数据集中将这家公司放在数据集中了

,那将是新的开发,即使不是这样,那将是重复的。而且,如果该公司的最新作品不大于或等于D1年的一年,那么它就会丢失。

Filter is Your Friend

On a separate sheet, in cell A1 as a heading lets place the word company and in B1 lets place status.Picture of headings

Now in cell A2 place =UNIQUE('Your Sheet Name'A2:A) to get a unique list of company names. Assuming your company names are on column A and start on the second row.

Picture of distinct results

Before the next part, lets place the year somewhere in the sheet. Lets do in cell D1 and to the left in cell C1 lets type in "Year" for clarification.

Year 2021

Now in cell B2:B1000 put =IF(A2 = "", ,IF(INDEX(SORT(FILTER(Sheet1!$A$2:$B,Sheet1!$A$2:$A = A2),2,FALSE),1,2) >= $D$1,IF(COUNTIF(Sheet1!$A$2:$A,A2) > 1,"Recurring","New"),"Lost"))

We basically are saying If the cell to the left of this formula is not blank and the most recent entry is greater than or equal to the year I placed in D1 then I want to see if this is the first time we have this company in our dataset

If it is, then it would be new development, if not then it would be recurring. And if the most recent entry for this company is not greater than or equal to the year in D1 then it was lost.

Finished product

别念他 2025-01-29 04:20:18

分组交易可以像:

=INDEX(1*QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))

”在此处输入图像描述“

和状态类似:

=ARRAYFORMULA(QUERY(IF(ISNUMBER(
 QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))*1=0, "lost", IF(ISNUMBER(
 QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))*1>ISNUMBER(
 QUERY(A3:C, "select A,count(A) where A is not null group by A pivot C"))*1, "new", "repeat")), "offset 1", ))

”在此处输入图像说明”

grouped deals can be done like:

=INDEX(1*QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))

enter image description here

and status like:

=ARRAYFORMULA(QUERY(IF(ISNUMBER(
 QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))*1=0, "lost", IF(ISNUMBER(
 QUERY(A3:C, "select count(A) where A is not null group by A pivot C"))*1>ISNUMBER(
 QUERY(A3:C, "select A,count(A) where A is not null group by A pivot C"))*1, "new", "repeat")), "offset 1", ))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文