简体   繁体   English

如何在 Google Sheet 公式和自动填充中写入最新记录?

[英]How to write latest record in Google Sheet formula and autofill?

I have a Google sheet - table 1 below and all the data is given.我有一个谷歌表 - 下面的表 1 并给出了所有数据。 Table 1 data is people(VenderNo) claim that they want to join event with what data(EventStartDate) and what booth number(BoothNo).表1数据是人们(VenderNo)声称他们想参加活动的数据(EventStartDate)和展位号(BoothNo)。 So the data is duplicated because people update it with new line and never allowd to delete or update the existing record(table 1).所以数据是重复的,因为人们用新行更新它并且永远不允许删除或更新现有记录(表 1)。

enter image description here在此处输入图像描述

And I also have a Google sheet - table 2 below and only EventStartDate and BoothNo are given.而且我还有一张谷歌表——下面的表 2,只给出了 EventStartDate 和 BoothNo。 All I want to do is the result like table 2's VenderNo.我想要做的就是像表 2 的 VenderNo 这样的结果。 The purpose of table 2 is trying to summarize which vendor is eventually joining the event with latest booth number.表 2 的目的是试图总结哪个供应商最终以最新的展位号参加此次活动。

Ideal result like blow:理想的结果,如打击:

enter image description here在此处输入图像描述

May I know how to write this formula in table 2 column C (VendorNo) with autofill function like ={ "VendorNo";我可以知道如何在表 2 列 C (VendorNo) 中使用自动填充 function 像 ={ "VendorNo"; unique(General:A2?A) } without hand dragging the formula? unique(General:A2?A) } 无需手动拖动公式?

Any thoughts and thank you.任何想法,谢谢。

PS: I am sorry I couldn't post image above directly because I don't have enough reputation. PS:很抱歉我不能直接在上面发布图片,因为我没有足够的声誉。

You don't need a Formula for that.你不需要一个公式。 Just select your columns and go to "Data" ->"Sort data"->"advanced sort settings" and then sort by column "EventStartDate" and secondly add sort by another column and add "BoothNo".只需 select 您的列和 go 到“数据”->“排序数据”->“高级排序设置”,然后按“EventStartDate”列排序,然后按另一列排序并添加“BoothNo”。 In the end you can run a data clean up to remove duplicates.最后,您可以运行数据清理以删除重复项。 You find it also under data.您也可以在数据下找到它。

在此处输入图像描述

to get the latest update from your table 1 you can use:要从表 1 中获取最新更新,您可以使用:

=SORTN(SORT(A2:C, B2:B, 0), 9^9, 2, 1, 1)

在此处输入图像描述

for your table 2 try:对于您的表 2,请尝试:

={"VN"; INDEX(IFNA(VLOOKUP(E2:E&F2:F, 
 SORTN(SORT({B2:B&C2:C, A2:C}, B2:B, 0), 9^9, 2, 2, 1), 2, 0)))}

在此处输入图像描述

Try尝试

={"vendor v2";arrayformula(iferror(
if(E2:E9&"~"&F2:F9=vlookup(E2:E9&"~"&RIGHT(F2:F9,2),sort(arrayformula({B2:B6&"~"&RIGHT(C2:C6,2),B2:B6&"~"&C2:C6,B2:B6,C2:C6,A2:A6}),2,0),2,0),
vlookup(E2:E9&"~"&RIGHT(F2:F9,2),sort(arrayformula({B2:B6&"~"&RIGHT(C2:C6,2),B2:B6&"~"&C2:C6,B2:B6,C2:C6,A2:A6}),2,0),5,0),)))}

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM