<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Count Repeated/Unique Strings/Values in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852101#M2734</link>
    <description>&lt;P&gt;this is exactly what I was searching for, thanks a lot Mr. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;, I will need study your 2D array to translate it to VBScript.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Dec 2021 23:09:54 GMT</pubDate>
    <dc:creator>jtm2020hyo</dc:creator>
    <dc:date>2021-12-31T23:09:54Z</dc:date>
    <item>
      <title>Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850211#M2727</link>
      <description>&lt;P&gt;I have an Variable like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ArrSource = A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4; A7,B2,C5;&lt;/P&gt;&lt;P&gt;'Note: ArrSource is String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I count all "C*" repeated values, I mean something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Convert Arr1 to multiple array:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Arr1 = A1,B2,C1&lt;/P&gt;&lt;P&gt;Arr2 = A2,B2,C1&lt;/P&gt;&lt;P&gt;Arr3 = A3,B2,C2&lt;/P&gt;&lt;P&gt;Arr4 = A4,B2,C2&lt;/P&gt;&lt;P&gt;Arr5 = A5,B2,C3&lt;/P&gt;&lt;P&gt;Arr6 = A6,B2,C4&lt;/P&gt;&lt;P&gt;Arr7 = A7,B2,C5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Then count all repeated value in the index 2 (third column) then store it in a variable in index 0 and their unique/repeated value in index 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Arr_01 = 2,C1&lt;/P&gt;&lt;P&gt;Arr_02 = 2,C2&lt;/P&gt;&lt;P&gt;Arr_03 = 1,C3&lt;/P&gt;&lt;P&gt;Arr_04 = 1,C4&lt;/P&gt;&lt;P&gt;Arr_05 = 1,C5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) concatenate such value with&amp;nbsp; the Unique Value in a Variable like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ArrFinal = 2,C1 ; 2,C2 ; 1,C3 ; 1,C4 ; 1,C5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some help?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:41:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850211#M2727</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2021-12-30T15:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850234#M2728</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my opinion there is a way little bit simple&lt;/P&gt;&lt;P&gt;If I understood well your array is composed by&amp;nbsp;&lt;SPAN&gt;A1,B2,C1 as Item(0) and for example&amp;nbsp;A2,B2,C1 as Item(1) it's correct my understand ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second question is the string length it's always the same ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can use the Instr function which return the position of a determinate string inside a string, if found the position will be returned by function, and array content could be manipulated by Mid function and counted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you can try to share your string I'll try to do some test.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:50:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850234#M2728</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-30T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850253#M2729</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understood well your array is composed by&amp;nbsp;&lt;SPAN&gt;A1,B2,C1 as Item(0) and for example&amp;nbsp;A2,B2,C1 as Item(1) it's correct my understand ?&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, but the first value start like an entire String, I could use Split function to separate my String to Array, but after that no sure what should I do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my opinion there is a way little bit simple&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second question is the string length it's always the same ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, index in position 0,1,2 could change their length, and possibly I could add index position 3,4,5,etc... Maybe another Split Function could help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can use the Instr function which return the position of a determinate string inside a string, if found the position will be returned by function, and array content could be manipulated by Mid function and counted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you can try to share your string I'll try to do some test.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;actually I just have a AutoCAD MEP file with VBScript functions , not sure if that could help. but in general the sample shared above It's enough in my opinion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PD: is there any Function to count repeated/unique values?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 16:01:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850253#M2729</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2021-12-30T16:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850599#M2730</link>
      <description>&lt;P&gt;try the below code it's VBA not VBscript,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub TextArray()&lt;BR /&gt;Dim ArrSource(10) As String&lt;BR /&gt;Dim N As Integer&lt;BR /&gt;Dim X As Integer&lt;/P&gt;&lt;P&gt;ArrSource(0) = "A1,B2,C1"&lt;BR /&gt;ArrSource(1) = "A2,B2,C1"&lt;BR /&gt;ArrSource(2) = "A3,B2,C2"&lt;BR /&gt;ArrSource(3) = "A4,B2,C2"&lt;BR /&gt;ArrSource(4) = "A5,B2,C3"&lt;BR /&gt;ArrSource(5) = "A6,B2,C4"&lt;BR /&gt;ArrSource(8) = "A7,B2,C5"&lt;/P&gt;&lt;P&gt;For X = LBound(ArrSource) To UBound(ArrSource)&lt;BR /&gt;If ArrSource(X) Like "A*" Then&lt;BR /&gt;CountA = CountA + 1&lt;BR /&gt;End If&lt;BR /&gt;Next X&lt;BR /&gt;Debug.Print CountA&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;Result will be 7 because all text in ArrSource which containing A* will be counted.&lt;/P&gt;&lt;P&gt;I don't know if this helps you or not, or probably I don't understood well your issue.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 19:31:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850599#M2730</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-30T19:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850787#M2731</link>
      <description>&lt;P&gt;thanks, looks cool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... But is there any method that uses SPLIT commnad to separate elements per ";" and "," and convert it in multiple arrays or nested arrays?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 21:58:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10850787#M2731</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2021-12-30T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10851263#M2732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use instr function see web site for instruction and example here the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/office/vba/Language/Reference/user-interface-help/instr-function" target="_blank"&gt;InStr function (Visual Basic for Applications) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 06:21:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10851263#M2732</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-31T06:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10851492#M2733</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try this code for split&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub SplitArrSource()
ArrSource = "A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4; A7,B2,C5;"
CountA = 1
N = 0
Dim ArrX() As String
Dim ArrA1() As String
Dim ArrB2() As String
Dim arrSplitStrings2() As Variant
arrSplitStrings1 = Split(ArrSource, ";")
For X = LBound(arrSplitStrings1) To UBound(arrSplitStrings1)
    ReDim Preserve arrSplitStrings2(N)
    arrSplitStrings2(N) = Split(arrSplitStrings1(X), ",")
    N = N + 1
Next
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grobnik_0-1640944657897.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1006346i386C20E9377640F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="grobnik_0-1640944657897.png" alt="grobnik_0-1640944657897.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You have to pay attention to space char if any inside the string&lt;/P&gt;&lt;P&gt;The above code has been developed inside Excel VBA Module, if you are using Autocad VBA you have to reference the Excel function into your Autocad Macro and use Execel Function pointing to Excel Object.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 10:11:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10851492#M2733</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-31T10:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852101#M2734</link>
      <description>&lt;P&gt;this is exactly what I was searching for, thanks a lot Mr. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;, I will need study your 2D array to translate it to VBScript.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 23:09:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852101#M2734</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2021-12-31T23:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852184#M2735</link>
      <description>&lt;P&gt;Happy New Year Mr. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... just curiously, What software are you using to debug your code?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 02:01:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852184#M2735</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2022-01-01T02:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852191#M2736</link>
      <description>Hi,&lt;BR /&gt;It's embededd inside VBA module. I guess you can find with MsOffice VBA&lt;BR /&gt;module.&lt;BR /&gt;I guess you can find into Autocad VBA development tools too.&lt;BR /&gt;The code in the post it's made by Excel VBA. I don't know MEP but for sure&lt;BR /&gt;you can find development tools with VBA.&lt;BR /&gt;</description>
      <pubDate>Sat, 01 Jan 2022 02:09:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10852191#M2736</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2022-01-01T02:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853537#M2737</link>
      <description>&lt;P&gt;Good day Mr &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... but how could I output the string concatenation of the array that contain the unique/repeated value of all index with the shape of "variable(n)(2)" in my arrSplitStrings2 array 2D? something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ArrSource = "A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4; A7,B2,C5;"

N = 0

arrSplitStrings1 = Split(ArrSource, ";")
For X = LBound(arrSplitStrings1) To UBound(arrSplitStrings1)
    ReDim Preserve arrSplitStrings2(N)
    arrSplitStrings2(N) = Split(arrSplitStrings1(X), ",")
    N = N + 1
Next

wscript.echo(arrSplitStrings2(1)(2)) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result should should be something like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;arrayfinal = array("2,C1 ; 2,C2 ; 1,C3 ; 1,C4 ; 1,C5")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;... being arrayfinal&amp;nbsp; a 2D array of (5x2)&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 13:22:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853537#M2737</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2022-01-02T13:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853587#M2738</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added some part of code showing you how to count the total count of A*, B*, C* with "Like" function always available in Excel.&lt;/P&gt;&lt;P&gt;As final result you will have three different variable&amp;nbsp; with count of A* composed by the total count a comma, and text counted.&lt;/P&gt;&lt;P&gt;FinalStringA = 8,A*&lt;BR /&gt;FinalStringB = 11,B*&lt;BR /&gt;FinalStringC = 11,C*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again I don't know how your source string is composed, here an example with A* B* C* search criteria (so for example A1, A2, B1, B2, C1, C2, etc)&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to create an array of final result you can.&lt;/P&gt;&lt;P&gt;I hope the can help you more, but I'm not in your mind, and I don't have the entire string.&lt;/P&gt;&lt;P&gt;For Example I applied the&amp;nbsp;UBound(arrSplitStrings2) - 1 because last char in the source string it's "blank" so the split function create the 7 position of array empty. But I don't know if you will have blank char in your string or source array.&lt;/P&gt;&lt;P&gt;For the same reason (presence of blank char before A or B or C) I used like "*A*" so all string containing any char before A and any char after A will be considered valid for count of type "A", "B" and "C".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub SplitArrSource()
ArrSource = "A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4; A7,B2,C5;"
N = 0
Dim arrSplitStrings2() As Variant
Dim CountA As Integer
Dim CountB As Integer
Dim CountC As Integer

arrSplitStrings1 = Split(ArrSource, ";")
For X = LBound(arrSplitStrings1) To UBound(arrSplitStrings1)
    ReDim Preserve arrSplitStrings2(N)
    arrSplitStrings2(N) = Split(arrSplitStrings1(X), ",")
    N = N + 1
Next

For XX = LBound(arrSplitStrings2) To UBound(arrSplitStrings2) - 1
    StringA = arrSplitStrings2(XX)
    If StringA(0) Like "*A*" = True Then
        CountA = CountA + 1
        FinalStringA = CStr(CountA) &amp;amp; "," &amp;amp; "A*"
        
    End If
    If StringA(1) Like "*B*" = True Then
        CountB = CountB + 1
        FinalStringB = CStr(CountB) &amp;amp; "," &amp;amp; "B*"
        
    End If
    If StringA(2) Like "*C*" = True Then
        CountC = CountC + 1
        FinalStringC = CStr(CountC) &amp;amp; "," &amp;amp; "C*"
        
    End If
Next XX

Debug.Print FinalStringA
Debug.Print FinalStringB
Debug.Print FinalStringC

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 14:51:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853587#M2738</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2022-01-02T14:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853621#M2739</link>
      <description>&lt;P&gt;Awesome as always.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any method to extract a column in a for loop?&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 15:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853621#M2739</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2022-01-02T15:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853626#M2740</link>
      <description>&lt;P&gt;I don't understand, I'm very sorry.&lt;/P&gt;&lt;P&gt;I used the above solution because the final string containing A1, B1 etc is composed as I showed before, if you have a different string or source array structure or contents code shall be modified in order to achive your goal.&lt;BR /&gt;Share the entire string for example and show us what do you want to extract, I guess looking at the entire string we can help you more, and overall explain what final result do you want.&lt;BR /&gt;Bye&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 15:12:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10853626#M2740</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2022-01-02T15:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10855843#M2741</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, if you look at this post&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/vba/autocad-mep-and-vba/td-p/10852709," target="_blank"&gt;https://forums.autodesk.com/t5/vba/autocad-mep-and-vba/td-p/10852709,&lt;/A&gt;&amp;nbsp;seems that AutocadMep could support VBA, so if you develop your soft for string managing or better directly the MEP object by VBA you should solve your issue with data extraction.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 20:19:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10855843#M2741</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2022-01-03T20:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count Repeated/Unique Strings/Values</title>
      <link>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10856873#M2742</link>
      <description>&lt;P&gt;Thanks a lot Mr. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt; . I already solved this by myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I received a bit help here too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.tek-tips.com/viewthread.cfm?qid=1813199" target="_blank"&gt;https://www.tek-tips.com/viewthread.cfm?qid=1813199&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 10:19:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/count-repeated-unique-strings-values/m-p/10856873#M2742</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2022-01-04T10:19:32Z</dc:date>
    </item>
  </channel>
</rss>

