• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

numbers in one sheet

webmax

Member
Hi

Please find the attached file.

I have data in the row wise . with using of formula or through macro the number will come in the single cell followed by comma.
regards
Shahul
 

Attachments

  • number in one cell.xlsx
    9.7 KB · Views: 5
Hi,

Either read this post

http://chandoo.org/wp/2014/01/13/combine-text-values-quick-tip/

or use a UDF.

Code:
Public Function COMBINE(a As Variant, Optional sep As String = "") As String
' Harlan Grove, Mar 2002
    Dim y As Variant
    If TypeOf a Is Range Then
        For Each y In a.Cells
            COMBINE = COMBINE & y.Value & sep
        Next y
    ElseIf IsArray(a) Then
        For Each y In a
            COMBINE = COMBINE & y & sep
        Next y
    Else
        COMBINE = COMBINE & a & sep
    End If
    COMBINE = Left(COMBINE, Len(COMBINE) - Len(sep))
End Function
 
@Deepak,

I have a doubt, suppose I have different data in one cell followed by comma. So, how to reverse the function.


VDS
 
Back
Top