Posts by jindon

    Re: Run-time error '1004'


    You might just pasted the code from somewhere I don't remember, but that code needs to be modified to suite your request, not just unprotect/protect.

    Re: pastespecial transpose loop


    For the data provided.

    Re: Match + Lookup - VBA


    Alternative, different method.

    Re: How do I automate to select particular columns from the mastersheet to another sh


    OK
    Try change

    Code
    If a(i, 51) <> "" Then 
                a(i, 51) = Format$(a(i, 51), "mmmm, yyyy") 
                dic(a(i, 51)).Add _ 
                Join(Array(a(i, 4), Format$(a(i, 51), "mm/dd/yyyy")), " - ") 
            End If


    to

    Code
    If a(i, 51) <> "" Then
                dic(Format$(a(i, 51), "mmmm, yyyy")).Add _
                Join(Array(a(i, 4), Format$(a(i, 51), "mm/dd/yyyy")), " - ")
            End If

    Re: .additem to a multicolumn listbox


    Just a guess since your explanation is not clear.

    Code
    ListBox1.AddItem ActiveCell.Offset(0, 1).Value
    ListBox1.List(ListBox1.ListCount - 1, 1) = ActiveCell.Offset(0, 2).Value
    ListBox1.List(ListBox1.ListCount - 1, 2) = ActiveCell.Offset(0, 3).Value

    Re: trouble inserting formula via VBA


    If I read it correctly,

    Code
    Sub test()
        With Range("b17", Range("b" & Rows.Count).End(xlUp)).Offset(, 1)
            .Resize(, 3).Formula = Array("=indirect(""'""&b17&""'!f67"")", _
            "=indirect(""'""&b17&""'!f75"")", "=indirect(""'""&b17&""'!f77"")")
        End With
    End Sub

    Re: trouble inserting formula via VBA


    Do you need Indirect Function?

    Code
    Range("c" & i + 2).Formula = "='" & Range("b" & i + 2).Value & "'!" & Range("f67").Value


    Indirect function

    Code
    Range("c" & i + 2).Formula = "=indirect(""'""&b" & i + 2 & "&""'!""&f67)"

    Re: Count the number of occurrences of a character in a cell


    Assuming the text is in A1

    Code
    Sub h()
        Dim i As Long, dic As Object
        Set dic = CreateObject("Scripting.Dictionary")
        For i = 1 To Len([a1])
            If Mid$([a1], i, 1) Like "[0-9]" Then dic(Mid$([a1], i, 1)) = dic(Mid$([a1], i, 1)) + 1
        Next
        If dic.Count Then [b1].Resize(dic.Count, 2).Value = Application.Transpose(Array(dic.keys, dic.items))
    End Sub

    Re: Combining duplicate entries with unique data in Excel(MAC)


    If this doesn't work, I need to see your workbook.

    Re: VBA to Consolidate and append data from several workbooks to one master file


    ArrayList
    See
    https://msdn.microsoft.com/en-….arraylist(v=vs.110).aspx


    Eveything is in vb Help.


    Brief explanation.


    1) Store each heading in ArrayList for creating unite heading for output.
    2) Each dictionary store unique col.A value and store each corresponding info in its child dictionry.
    3) Output all the info regarding all the unique Col.A value to the worksheet.

    Re: How do I automate to select particular columns from the mastersheet to another sh


    See if this is how you wanted.