"xl get unique values" Code Answer's

You're definitely familiar with the best coding language VBA that developers use to develop their projects and they get all their queries like "xl get unique values" answered properly. Developers are finding an appropriate answer about xl get unique values related to the VBA coding language. By visiting this online portal developers get answers concerning VBA codes question like xl get unique values. Enter your desired code related query in the search bar and get every piece of information about VBA code related question on xl get unique values. 

xl get unique values

By Excel HeroExcel Hero on May 01, 2020
Function DistinctVals(a, Optional col = 1)
    Dim i&, v: v = a
    With CreateObject("Scripting.Dictionary")
        For i = 1 To UBound(v): .Item(v(i, col)) = 1: Next
        DistinctVals = Application.Transpose(.Keys)
    End With
End Function

'-----------------------------------------------------------------------

'If you happen to have Office365, the above function can be shortened
'to make use of the Office365 worksheet function 'UNIQUE()' instead 
'of the dictionary:

Function DistinctVals(r As Range)
  DistinctVals = WorksheetFunction.Unique(r)
End Function

Source: academy.excelhero.com

Add Comment

16

All those coders who are working on the VBA based application and are stuck on xl get unique values can get a collection of related answers to their query. Programmers need to enter their query on xl get unique values related to VBA code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about xl get unique values for the programmers working on VBA code while coding their module. Coders are also allowed to rectify already present answers of xl get unique values while working on the VBA language code. Developers can add up suggestions if they deem fit any other answer relating to "xl get unique values". Visit this developer's friendly online web community, CodeProZone, and get your queries like xl get unique values resolved professionally and stay updated to the latest VBA updates. 

VBA answers related to "xl get unique values"

View All VBA queries

VBA queries related to "xl get unique values"

excel vba get unique values from array excel udf get unique values excel vba get unique values xl get unique values get unique random number in vb.net excel vba get distinct values from range excel vba initialize or detect NaN, +infinity, -infinity, special values excel vba initialize or detect NaN infinity infinity special values excel add leading zeros to existing values excel vba select case between two values excel vba copy entire sheet paste values inti list assign values in vb.net excel vba hide zero values excel vba populate array with cell values vba initialize or detect NaN infinity infinity special values excel vba copy values range to another range excel vba find get last row in column excel-vba get integer high byte excel vba how to get the old value of a changed cell excel vba get the path of current workbook vb.net get name by Cell Click excel vba get the workbook full file name with path excel vba get ordinal number from cardinal number excel vba property let get excel vba class get set property excel vba how to get a range's full address including sheet name excel vba get column number from column name excel vba get low byte from INTEGER vb.net get name by Selection Changed vb.net get string between two strings excel vba get list of Excel files in a folder excel vba get the workbook full filename with path excel vba get user selected range excel vba get column name from number get name of a range vba excel vba get a range of full rows excel vba get a range of full rows or columns excel vba get a range of full columns vba http get vba get workbook name vb get ip address vba varType get description excel vba find get last rowin column how do you get data from excel vba get html element vba get registry value vba get windows version vba get application version get all column names from excel vba vba get text file content get current year vb VB get external IP address get excel file from email attachment in vba get current url vb.net vba get pivot taable settings vba get relative cell address excel vba http get

Browse Other Code Languages

CodeProZone