[英]I want to identify duplicates and keep the most recent one and delete the other in Google Sheets
[英]How do I combine multiple formulas into one cell? remove duplicates and keep latest date in google sheets
我有一個代碼,按2個日期過濾數據。 我還希望它刪除任何重復項並保留最新日期。
這就是我獲取數據的方法。 我需要知道如何將DUPLICATE
添加到公式中。 然后保留最新的日期。
=QUERY(All!A:Z, "Select A, B, C, D, E, F, G, H where toDate(E) >= date '"&TEXT(A1, "yyyy-mm-dd")&"' and toDate(E) <= date '"&TEXT(B1, "yyyy-mm-dd")&"'"
更新:QUERY(全部!A:Z,“選擇A,B,C,D,E,F,G,H,其中toDate(E)> = date'”&TEXT(A1,“yyyy-mm-dd”)& “'和toDate(E)<= date'”&TEXT(B1,“yyyy-mm-dd”)&“'order by(I)desc”,(FILTER(A:Z,TRUE)))
試試這個,如果它適合你:
=QUERY(All!A:Z, "select A, B, C, D, E, F, G, H
where toDate(E) >= date '"&TEXT(A1, "yyyy-mm-dd")&"'
and toDate(E) <= date '"&TEXT(B1, "yyyy-mm-dd")&"'
order by toDate(E) desc
limit 1", 0)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.