Results 1 to 15 of 15

How to write and concatenate multi elements from an array to a single cell on a worksheet

Threaded View

Xceller How to write and concatenate... 11-25-2014, 06:40 PM
pjwhitfield Re: How to write and... 11-25-2014, 07:04 PM
Xceller Re: How to write and... 11-25-2014, 07:21 PM
AB33 Re: How to write and... 11-25-2014, 07:07 PM
Xceller Re: How to write and... 11-25-2014, 07:23 PM
Marc L Re: How to write and... 11-25-2014, 09:15 PM
Xceller Re: How to write and... 11-25-2014, 10:19 PM
Marc L Re: How to write and... 11-26-2014, 06:05 AM
AB33 Re: How to write and... 11-26-2014, 05:44 AM
Xceller Re: How to write and... 11-26-2014, 01:49 PM
AB33 Re: How to write and... 11-26-2014, 02:06 PM
Xceller Re: How to write and... 11-26-2014, 03:39 PM
AB33 Re: How to write and... 11-26-2014, 04:27 PM
Xceller Re: How to write and... 11-26-2014, 04:46 PM
AB33 Re: How to write and... 11-26-2014, 05:26 PM
  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    How to write and concatenate multi elements from an array to a single cell on a worksheet

    Hi everyone,

    Any help or input would be greatly appreciated. This is the line that I have trouble with: Cells(i, 1) = Missing

    Result I am hoping for: 32, 35,49,76
    Concatenated with "," between the elements in array

    Sub MatchThem()
    Dim There(1 To 99) As Integer
    Dim Missing() As Integer
    
    Application.ScreenUpdating = False
    On Error Resume Next
    
    For i = 4 To 27
        For j = 5 To 304
            There(Cells(i, j).Value) = 1
        Next
            If Application.WorksheetFunction.Sum(There) = 99 Then
                Cells(i, "A") = "AllThere"
            Else
                n = 0
                For k = 1 To 99
                    If Not There(k) = 1 Then
                        n = n + 1
                    ReDim Preserve Missing(1 To 1, 1 To n)
                        Missing(1, n) = k
                    End If
                Next
                Cells(i, 1) = Missing
            End If
        Erase There
    Next
    On Error GoTo 0
    Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Removing specific elements from an Array based on matching elements in a different Array
    By jamesdeuce in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-24-2014, 10:35 PM
  2. help assigning elements of dictionary to array and then pasting array into worksheet
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-05-2013, 10:37 AM
  3. multiple string dates in cell, to array, and manipulate single elements
    By willara23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2013, 07:48 PM
  4. [SOLVED] Populate Listbox with all rows of a dynamic array where elements of a single array match.
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-07-2012, 04:54 AM
  5. Single Conditional Array x two Multi-Column Array - Approach needed
    By David Brown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2010, 11:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1