Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8955091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:27:59+00:00 2026-06-15T14:27:59+00:00

Suppose an Excel sheet has a column named Student Names and the column has

  • 0

Suppose an Excel sheet has a column named Student Names and the column has duplicate values. Say,

Student
=======

Arup
John
Mike
John
Lisa
Arup

Using VBScript, how can I get unique values as below?

Arup
John
Lisa
Mike
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:28:01+00:00Added an answer on June 15, 2026 at 2:28 pm

    The VBScript tool for getting unique items is a dictionary: add all the items as keys to a dictionary and dictionary.Keys() will return an array of the – per definitionem – unique keys. In code:

      Dim aStudents : aStudents = Array("Arup", "John", "Mike", "John", "Lisa", "Arup")
      WScript.Echo Join(aStudents)
      Dim aUniqStudents : aUniqStudents = uniqFE(aStudents)
      WScript.Echo Join(aUniqStudents)
    
    ' returns an array of the unique items in for-each-able collection fex
    Function uniqFE(fex)
      Dim dicTemp : Set dicTemp = CreateObject("Scripting.Dictionary")
      Dim xItem
      For Each xItem In fex
          dicTemp(xItem) = 0
      Next
      uniqFE = dicTemp.Keys()
    End Function
    

    output:

    Arup John Mike John Lisa Arup
    Arup John Mike Lisa
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to get the range of occupied cells in excel sheet Im
I have an excel sheet with values in columns A, B and C like
Suppose I have Sheet(1) in an excel. Now i do also have 2500 rows
I want to enter multiple values in a single cell in excel sheet based
Please click on this link for the image of the excel sheet containing the
I am having an issue is that while exporting a report to excel sheet,
I have some strings in Java (originally from an Excel sheet) that I presume
I have trouble comparing 2 double in Excel VBA suppose that I have the
Suppose I have a column called item code as below: ----- ------ |row| |code|
I want to automatically sort fields in excel when entering new data. Suppose I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.