How to pick one of the results of UNIQUE() in Google Sheets
文章推薦指數: 80 %
I have a column with duplicate items in Google Sheets, and I would like to get one of the unique values (say, the last one) in the cell of ... Home Public Questions Tags Users Collectives ExploreCollectives FindaJob Jobs Companies Teams StackOverflowforTeams –Collaborateandshareknowledgewithaprivategroup. CreateafreeTeam WhatisTeams? Teams CreatefreeTeam CollectivesonStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore HowtopickoneoftheresultsofUNIQUE()inGoogleSheets AskQuestion Asked 2years,1monthago Active 2years,1monthago Viewed 1ktimes 0 Problem IhaveacolumnwithduplicateitemsinGoogleSheets,andIwouldliketogetoneoftheuniquevalues(say,thelastone)inthecelloftheformula.Isthereawaytodothiswithjustformulas(i.e.,noscripts/macros)? WhatI'vetried Notsureifthisisthebestway,butI'vetriedusingtheUNIQUE(range)function,whichreturnsalistofdistinctvalues,andItriedtopickonewithFILTER(range,condition1,[condition2,…]),butI'veonlymanagedtodoitwhenIknowinadvanceandhard-codeinthenumberofuniquevalues. SinceIcangetthelengthoftheuniquelistwith=LEN(UNIQUE(my_range)),ItriedusingtheREPT(text_to_repeat,number_of_repetitions)function. Forexample, =REPT(0&";",2)&1returns"0;0;1" but =FILTER(UNIQUE(A$1:A$26),{REPT(0&";",2)&1}) (oranyvariationItried)doesn'tquitework. P.S. Irealisethisisnotthemostsuitableproblemforaspreadsheet,andIdowishIwasusingsomethinglikePython,butthisistherestrictionatthemoment. google-sheetsfilteruniquegoogle-sheets-formulagoogle-sheets-query Share Improvethisquestion Follow editedNov1'19at0:30 player0 82.6k88goldbadges4141silverbadges8282bronzebadges askedNov1'19at0:19 RatlerRatler 37922silverbadges1313bronzebadges Addacomment | 2Answers 2 Active Oldest Votes 2 try: =QUERY(UNIQUE(A1:A),"offset"&COUNTA(UNIQUE(A1:A))-1) Share Improvethisanswer Follow answeredNov1'19at0:30 player0player0 82.6k88goldbadges4141silverbadges8282bronzebadges 1 1 ThisworksandisfascinatingbecauseIhadnoideaabouttheQueryfunction,whichdefinitelymakeslifeeasier,so+1!However,ImarkedTomSharpe'sanswerastheacceptedonejustbecauseit's(slightly)simplerandstillanswersthespecificquestion. – Ratler Dec2'19at12:33 Addacomment | 1 Ormoreold-schoolusingindex: =index(unique(A:A),counta(unique(A:A))) Youcanalsojustenteranumberfottheoneyouwante.g. =index(unique(A:A),2) Share Improvethisanswer Follow editedNov1'19at9:06 answeredNov1'19at8:32 TomSharpeTomSharpe 24.2k44goldbadges1818silverbadges3131bronzebadges Addacomment | YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedgoogle-sheetsfilteruniquegoogle-sheets-formulagoogle-sheets-queryoraskyourownquestion. TheOverflowBlog Smashingbugstosetaworldrecord:AWSBugBust Podcast399:ZerotoMVPwithoutprovisioningadatabase FeaturedonMeta Reducingtheweightofourfooter NewresponsiveActivitypage Communityinputneeded:Therulesforcollectivesarticles A/BtestingontheAskpage Related 88 unique()formorethanonevariable 1 Googlesheets-Collectinguniquevaluesfromseveralsheets? 1 GoogleSheets-Query,selectxoryandexcluded0results 1 PulluniquevaluesfromothersheetsasnewsheetskeepgettingaddedinGoogleSheets 1 GoogleSheets-filterlistexcludingvaluesfromotherlist 1 Whatisthefunctionforfilteringdatathatisnotinalistingooglesheets? 0 Findeveryunique2wordpairingsfromacolumnoftermsinGoogleSheets 0 GoogleSheets-CountUniqueValuesofImportrangeDatabetweenGivenDates HotNetworkQuestions Shortstoryaboutascientistwhogoesintothepasttochangeevolution HowdoIleaveacompanyongoodtermsifmyprojectmanagerviewsleavingthecompanyasaformofbetrayal? Areallfreeultrafilters'thesame'insomesense? IfIgetapositiveresponseonaCovid-19testforthepurposeoftravellingtotheUSA,andthendoanotherandgetanegative,canIusethatone? Takingconstantoutofindefiniteintegrals Afterourfirstzoominterview,mypotentialsupervisoraskedmetoprepareapresentationforanextzoommeeting Findingtheresonancefrequencyforforceddampedoscillations AoCG2021Day11:Garbagefulstreams HowtogetthebuildprocedureforaDebianpackage? WhymightQuakerunslowlyonamodernPC? Whatisthecovariancematrixofthenormalorderstatistics? Whatisdifferencebetweenmergeatcenterandscalealongaxis=0for3vertexwhicharecollinear? HowwereIntelsat1“EarlyBird”andTelstar1's"hundreds"ofsimultaneoustelephoneconversationsmultiplexed/demultiplexed? HowcanIavoidoverdraftfeeswhilemovingallofmyfundstoanewbank? Whatismeantbyfilterorderofapassivefilter? EmployerwantstochangesalaryafterIsignedcontract Whatistheratiooffattoflourinshortcrustpastry? Boss'scriticismforthingsoutofmyscope Doesvoltagedropexistinacurrentcarryingloopofwire cunnilingusvscunnilinctus AoCG2021Day10:Memoryreallocationroutine Myadvisorwantsmetoquittheprogram.WhatshouldIdo? Howdoyoudistinguish"Substantiv+nach"from"after"inGerman? Isthemelodicminorakeyaswellasascale? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1How to pick one of the results of UNIQUE() in Google Sheets
I have a column with duplicate items in Google Sheets, and I would like to get one of the unique ...
- 2Distinct Values in Drop Down List in Google Sheets
Use Data Validation to Create Unique / Distinct / Drop-Down Lists · Go to cell A1 and then go to ...
- 3How to Find Unique Values in Google Sheets (2 Easy Methods)
- 4How to use the UNIQUE function in Google Sheets - Sheetgo ...
As the name suggests, the Google Sheets UNIQUE function enables you to pull out unique rows from ...
- 5Get unique values from range of cells - Web Applications ...
In Google Spreadsheets, you can use the UNIQUE() formula to do that. Formula. =UNIQUE(A1:A10). Ex...