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 984019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:56:55+00:00 2026-05-16T04:56:55+00:00

i have a string separated by commas, is it possible to use an excel

  • 0

i have a string separated by commas, is it possible to use an excel formula to sort within the values within the cell?

  • 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-05-16T04:56:55+00:00Added an answer on May 16, 2026 at 4:56 am

    Here’s a solution (quicksort code stolen from here). You would just wire up a button to the SortVals macro and you could just click the button and it’ll sort the comma separated values in the active cell.

    Option Explicit
    
    Public Sub SortVals()
        Dim i As Integer
        Dim arr As Variant
        arr = Split(ActiveCell.Text, ",")
    
        ' trim values so sort will work properly
        For i = LBound(arr) To UBound(arr)
            arr(i) = Trim(arr(i))
        Next i
    
        ' sort
        QuickSort arr, LBound(arr), UBound(arr)
    
        ' load sorted values back to cell
        Dim comma As String
        comma = ""
        ActiveCell = ""
        For i = LBound(arr) To UBound(arr)
            ActiveCell = ActiveCell & comma & CStr(arr(i))
            comma = ","
        Next i
    End Sub
    
    Public Sub QuickSort(vArray As Variant, inLow As Long, inHi As Long)
    
      Dim pivot   As Variant
      Dim tmpSwap As Variant
      Dim tmpLow  As Long
      Dim tmpHi   As Long
    
      tmpLow = inLow
      tmpHi = inHi
    
      pivot = vArray((inLow + inHi) \ 2)
    
      While (tmpLow <= tmpHi)
    
         While (vArray(tmpLow) < pivot And tmpLow < inHi)
            tmpLow = tmpLow + 1
         Wend
    
         While (pivot < vArray(tmpHi) And tmpHi > inLow)
            tmpHi = tmpHi - 1
         Wend
    
         If (tmpLow <= tmpHi) Then
            tmpSwap = vArray(tmpLow)
            vArray(tmpLow) = vArray(tmpHi)
            vArray(tmpHi) = tmpSwap
            tmpLow = tmpLow + 1
            tmpHi = tmpHi - 1
         End If
    
      Wend
    
      If (inLow < tmpHi) Then QuickSort vArray, inLow, tmpHi
      If (tmpLow < inHi) Then QuickSort vArray, tmpLow, inHi
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 501k
  • Answers 501k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'd read this which is more accurate, IMHO Grant's take… May 16, 2026 at 2:21 pm
  • Editorial Team
    Editorial Team added an answer If you have both heads in your repository (remember, you… May 16, 2026 at 2:21 pm
  • Editorial Team
    Editorial Team added an answer for /f "tokens=*" %x in (a.txt) do @echo %x The… May 16, 2026 at 2:21 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a table which stores comma separated values in an NVARCHAR(MAX). I have
I have a String made up of several Strings seperated by commas. Using StringTemplate,
I have one XML file where values are stored in category element separated by
I have string like this: command . / * or any other char like
I have a custom model binder that takes a comma separated list and cleans
In my properties file I have one property, which contains a comma separated list
I have created a QComboBox delegate which I use for a single column of
I have read quite a few selcet+update questions in here but cannot understand how
I have a list of integers and I want to be able to convert
I have a form which uploads multiple file fields into a db using codeigniter.

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.