计数日期不工作
我有两张床单。主数据表(表1)和2023停电日历(表2)。
我想要实现的是一个公式,计算在我的主数据表1[安装日期]中安排了多少次日期,它与表2[转换日期]中的2023日历相匹配/引用,并将计数带入表2中的[使用的插槽]。
我尝试过无数的公式(计数,索引/匹配,计数/连接/收集,不同),其中许多只填充1或0 -这是不正确的。列是日期列,而不是引用文本字段——[Lookup]满足这一点。
创建额外的列[Lookup Date]和[Helper]是为了尝试其他方法。以前我遇到过引用列与以前的公式或日期列通过公式关闭提示[查找日期]的问题。如果有人能帮我解决这个问题,我真的需要一些帮助。
我能够在表1中计算[Helper]列的总数,但无法通过引用将另一个表中的计数加起来。=COUNT(INDEX({2023停电日历查找},MATCH([安装日期]@row,{2023停电转换日期}))))
最佳答案
-
Samelizsmi ✭✭
莱恩,谢谢你的努力。这是我尝试的第一个公式,因为这是它通常的布局。经过整整两天和大约50个配方,我找到了一个!它不只是返回1或0。看起来,如果您引用的是第二张表,而不是主表,并且两列都有日期,则该公式需要包括HAS。
这里有一个公式,适用于任何遇到这个问题的人。
=COUNTIF({查找日期},HAS(@cell,[查找日期]@row))
答案
-
瑞安国 ✭✭✭✭✭✭
嘿!您是否希望计算每个转换日期的安装列中的日期?
如果是这样,下面是插槽使用栏的公式……
=COUNTIFS({2023空白日历查找},[转换日期]@行)
-
Samelizsmi ✭✭
莱恩,谢谢你的努力。这是我尝试的第一个公式,因为这是它通常的布局。经过整整两天和大约50个配方,我找到了一个!它不只是返回1或0。看起来,如果您引用的是第二张表,而不是主表,并且两列都有日期,则该公式需要包括HAS。
这里有一个公式,适用于任何遇到这个问题的人。
=COUNTIF({查找日期},HAS(@cell,[查找日期]@row))
-
瑞安国 ✭✭✭✭✭✭
我不明白为什么需要HAS。您的所有列都是Date类型吗?
-
Samelizsmi ✭✭
我也不知道,但这是唯一能让一切正确的公式。所有列都是日期类型列。它们也是包含公式的列。(您将看到查找列旁边的fx)。
也许是因为所有引用的日期都在表格2中,而我创建的公式也在同一表格2中?只需要把第15页的日期加到第2页上。它可能只是一个时髦的智能手机的细微差别。我之前遇到过一些会让公式出错的。
帮助文章参考资料欧宝体育app官方888
类别
=COUNTIFS({SUG Requests Fleet}, @cell = 737, {SUG Scheduled}, @cell = 1)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":106166,"type":"question","name":"simple comparison","excerpt":"I can't believe I have to ask this, but I cannot turn up a solid answer when I search. I just want to compare Column2 value with Column1 value. I want the formula\/result to be in Column3. I get UNPARSEABLE. The best formula I could find was: =IF([TotalRegistered] = [RegistrationCap], \"SOLD OUT\", \"//www.santa-greenland.com/community/discussion/103961/\"). The only thing I can…","categoryID":322,"dateInserted":"2023-06-07T19:25:09+00:00","dateUpdated":null,"dateLastComment":"2023-06-08T12:27:38+00:00","insertUserID":156879,"insertUser":{"userID":156879,"name":"wkhuser","url":"https:\/\/community.smartsheet.com\/profile\/wkhuser","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-08T12:41:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-08T14:56:15+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":26,"score":null,"hot":3372394967,"url":"https:\/\/community.smartsheet.com\/discussion\/106166\/simple-comparison","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106166\/simple-comparison","format":"Rich","lastPost":{"discussionID":106166,"commentID":379511,"name":"Re: simple comparison","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379511#Comment_379511","dateInserted":"2023-06-08T12:27:38+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-08T14:56:15+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-08T12:06:38+00:00","dateAnswered":"2023-06-07T19:31:56+00:00","acceptedAnswers":[{"commentID":379435,"body":"
You need to specify a row reference.<\/p>
=IF([TotalRegistered]@row = [RegistrationCap]@row, \"SOLD OUT\", \"//www.santa-greenland.com/community/discussion/103961/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":106171,"type":"question","name":"Formula Not work for only 5 months","excerpt":"Hey All, =COUNTIFS({Request - Create Date}, IFERROR(MONTH(@cell), 0) = [WSSM#]@row, {Request - Create Date}, IFERROR(YEAR(@cell), 0) = Year@row, {Request - Segment}, =\"WellMed\", {WSS}, =\"Accounts Receivable\" + COUNTIFS({Complete Create Date}, IFERROR(MONTH(@cell), 0) = [WSSM#]@row, {Complete Create Date},…","categoryID":322,"dateInserted":"2023-06-07T21:19:19+00:00","dateUpdated":null,"dateLastComment":"2023-06-08T00:51:09+00:00","insertUserID":144713,"insertUser":{"userID":144713,"name":"Dakota Haeffner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Dakota%20Haeffner","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-9EoN6cCJXs!7Dcqe8-aSLs!vmL02Fkj5JV","dateLastActive":"2023-06-08T00:47:29+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":144713,"lastUser":{"userID":144713,"name":"Dakota Haeffner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Dakota%20Haeffner","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-9EoN6cCJXs!7Dcqe8-aSLs!vmL02Fkj5JV","dateLastActive":"2023-06-08T00:47:29+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":31,"score":null,"hot":3372359428,"url":"https:\/\/community.smartsheet.com\/discussion\/106171\/formula-not-work-for-only-5-months","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106171\/formula-not-work-for-only-5-months","format":"Rich","lastPost":{"discussionID":106171,"commentID":379471,"name":"Re: Formula Not work for only 5 months","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379471#Comment_379471","dateInserted":"2023-06-08T00:51:09+00:00","insertUserID":144713,"insertUser":{"userID":144713,"name":"Dakota Haeffner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Dakota%20Haeffner","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-9EoN6cCJXs!7Dcqe8-aSLs!vmL02Fkj5JV","dateLastActive":"2023-06-08T00:47:29+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/7KQ5622RKVC3\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-08T00:51:13+00:00","dateAnswered":"2023-06-07T22:34:26+00:00","acceptedAnswers":[{"commentID":379468,"body":"
It helps me to break out the formula:<\/p>