Results 1 to 10 of 604

Thread: Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Coding in support of these Thread posts
    http://www.excelfox.com/forum/showth...ll=1#post11569
    http://www.excelfox.com/forum/showth...ll=1#post11672




    Code:
    
    Sub ipconfigall_routeprint(Optional ByVal Msg As String) '
    Rem 1 ipconfig /all
     Shell "cmd.exe /c ""ipconfig /all > """ & ThisWorkbook.Path & "\ipconfig__all.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig__all.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, -1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, -1, vbBinaryCompare)
    ' add any extra info to string
    Dim PublicIP As String: Call PubicIP(PublicIP)
      Let strIPcon = "ipconfig /all   route print" & Msg & vbCr & vbLf & ComputerName & vbCr & vbLf & GetIpAddrTable & vbCr & vbLf & PublicIP & vbCr & vbLf & vbCr & vbLf & """" & Format(Now, "DD MMM YYYY") & " " & vbLf & " " & Format(Now, "hh mm ss") & """" & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & strIPcon        ' vbLf is recognised as a new line within an Excel"
    ' String content check
    ' Call WtchaGot(strIPcon)
    ' put the text in the clipboard
    Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
    objDataObject.SetText strIPcon: objDataObject.PutInClipboard
    
    ' Excel Worksheet
    Dim Ws As Worksheet: Set Ws = ActiveSheet
    Dim Clm As Range, NxtClm As Long
     Set Clm = Ws.Cells.Find(What:="*", After:=Ws.Range("A1"), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
        If Clm Is Nothing Then
         Let NxtClm = 2
        Else
         Let NxtClm = Clm.Column + 1
        End If
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(1, NxtClm)
    ' Ws.Columns.AutoFit: Ws.Rows.AutoFit
    
    Rem 2 route print
     Shell "cmd.exe /c ""route print > """ & ThisWorkbook.Path & "\route_print.txt"""""
    ' Get the entire text file as a string
     Let FileNum = FreeFile(1) '              ' The "highway/ street/ link" to be built to transport the text will be given a number. It must be unique. So we use for convenience, the Freefile function: it returns an integer that represents the next file number that the Open statement can use.  The optional argument for the range number is a variant that is used to specify a range from which the next free file number is returned. Enter a value of data type 0 (default) to return a file number in the range 1 - 255 inclusive. Enter 1 to return a file number in the range 256 - 511.   https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/freefile-function  . Note also : Use file numbers in the range 1-255, inclusive, for files not accessible to other applications. Use file numbers in the range 256-511 for files accessible from other applications
    Dim strrouteprint As String
     Let PathAndFileName = ThisWorkbook.Path & "\route_print.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strrouteprint = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strrouteprint
      Close #FileNum
    ' Tidy the string
     Let strrouteprint = Replace(strrouteprint, vbCr & vbCr, vbCr, 1, -1, vbBinaryCompare)
     Let strrouteprint = Replace(strrouteprint, vbTab, "   ", 1, -1, vbBinaryCompare)
    ' put the text in the clipboard
    objDataObject.SetText strrouteprint: objDataObject.PutInClipboard
    ' Excel Worksheet
    Dim Lr As Long: Let Lr = Ws.Cells(Ws.Rows.Count, NxtClm).End(xlUp).Row
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(Lr + 30, NxtClm)
     Ws.Columns.AutoFit: Ws.Rows.AutoFit
     ActiveWindow.Panes(2).Activate
     Ws.Cells.Item(1, NxtClm).Select
    End Sub
    '
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    In support of this Thread
    http://www.excelfox.com/forum/showthread.php/2402-Extract-Multiple-Rows-into-a-Limited-Template-based-on-Multiple-Criterias
    http://www.excelfox.com/forum/showth...iple-Criterias


    _____ Workbook: BeforeDumpTemplate.xlsm ( Using Excel 2007 32 bit )
    01.01.2020_99909900 - A 01.01.2020_88888888 - F 01.01.2020_88888886 - D 01.01.2020_88888887 - E 02.01.2020_99909900 - A 03.01.2020_99909900 - A 04.01.2020_88888888 - F 05.01.2020_88888888 - F 06.01.2020_88888888 - F 07.01.2020_88888888 - F 08.01.2020_88888888 - F 09.01.2020_88888888 - F 10.01.2020_99909900 - A 11.01.2020_99909900 - A 12.01.2020_99909900 - A 13.01.2020_99909900 - A 14.01.2020_99909900 - A 15.01.2020_99909900 - A
    Worksheet: arrUnicDtsSrc
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

  3. #3
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    In support of this Thread
    http://www.excelfox.com/forum/showthread.php/2402-Extract-Multiple-Rows-into-a-Limited-Template-based-on-Multiple-Criterias
    http://www.excelfox.com/forum/showth...iple-Criterias



    _____ Workbook: BeforeDumpTemplate.xlsm ( Using Excel 2007 32 bit )
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item B LLL000 1 131 131 8.9E+07 F 1 131 131 01.01.2020_88888888 - F
    01.01.2020 5 Item C LLL000 5 550 2750 8.9E+07 F 5 550 2750 01.01.2020_88888888 - F
    01.01.2020 1 Item D ABC123 1 2000 2000 8.9E+07 D 1 2000 2000 01.01.2020_88888886 - D
    01.01.2020 4 Item D LLL000 1 131 131 8.9E+07 E 1 131 131 01.01.2020_88888887 - E
    01.01.2020 5 Item E LLL000 5 550 2750 8.9E+07 F 5 550 2750 01.01.2020_88888888 - F
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    01.01.2020 1 Item A ABC123 1 2000 2000 1E+08 A 1 2000 2000 01.01.2020_99909900 - A
    01.01.2020 4 Item D LLL000 1 131 131 1E+08 A 1 131 131 01.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    02.01.2020 2 Item B ABC122 1 3500 3500 1E+08 A 1 3500 3500 02.01.2020_99909900 - A
    03.01.2020 3 Item C LLL000 4 10.4 41.6 1E+08 A 4 10.4 41.6 03.01.2020_99909900 - A
    04.01.2020 4 Item D LLL001 1 131 131 8.9E+07 F 1 131 131 04.01.2020_88888888 - F
    05.01.2020 5 Item E ABC999 8 550 4400 8.9E+07 F 8 550 4400 05.01.2020_88888888 - F
    06.01.2020 6 Item F ABC999 1 2500 2500 8.9E+07 F 1 2500 2500 06.01.2020_88888888 - F
    07.01.2020 7 Item G LLL001 1 2500 2500 8.9E+07 F 1 2500 2500 07.01.2020_88888888 - F
    08.01.2020 8 Item H LLL001 1 2250 2250 8.9E+07 F 1 2250 2250 08.01.2020_88888888 - F
    09.01.2020 4 Item D ABC123 1 2250 2250 8.9E+07 F 1 2250 2250 09.01.2020_88888888 - F
    10.01.2020 5 Item E ABC122 1 2250 2250 1E+08 A 1 2250 2250 10.01.2020_99909900 - A
    11.01.2020 11 Item K ABC122 1 600 600 1E+08 A 1 600 600 11.01.2020_99909900 - A
    12.01.2020 12 Item L ABC123 1 4992 4992 1E+08 A 1 4992 4992 12.01.2020_99909900 - A
    13.01.2020 13 Item M ABC122 1 10 10 1E+08 A 1 10 10 13.01.2020_99909900 - A
    14.01.2020 6 Item F LLL000 1 2731 2731 1E+08 A 1 2731 2731 14.01.2020_99909900 - A
    15.01.2020 7 Item G ABC122 1 85000 85000 1E+08 A 1 85000 85000 15.01.2020_99909900 - A
    01.01.2020 5 Item E LLL000 5 550 2750 1E+08 A 5 550 2750 01.01.2020_99909900 - A
    02.01.2020 2 Item B ABC122 1 3500 3500 1E+08 A 1 3500 3500 02.01.2020_99909900 - A
    03.01.2020 3 Item C LLL000 4 10.4 41.6 1E+08 A 4 10.4 41.6 03.01.2020_99909900 - A
    04.01.2020 4 Item D LLL001 1 131 131 8.9E+07 F 1 131 131 04.01.2020_88888888 - F
    05.01.2020 5 Item E ABC999 8 550 4400 8.9E+07 F 8 550 4400 05.01.2020_88888888 - F
    06.01.2020 6 Item F ABC999 1 2500 2500 8.9E+07 F 1 2500 2500 06.01.2020_88888888 - F
    07.01.2020 7 Item G LLL001 1 2500 2500 8.9E+07 F 1 2500 2500 07.01.2020_88888888 - F
    08.01.2020 8 Item H LLL001 1 2250 2250 8.9E+07 F 1 2250 2250 08.01.2020_88888888 - F
    09.01.2020 4 Item D ABC123 1 2250 2250 8.9E+07 F 1 2250 2250 09.01.2020_88888888 - F
    10.01.2020 5 Item E ABC122 1 2250 2250 1E+08 A 1 2250 2250 10.01.2020_99909900 - A
    11.01.2020 11 Item K ABC122 1 600 600 1E+08 A 1 600 600 11.01.2020_99909900 - A
    12.01.2020 12 Item L ABC123 1 4992 4992 1E+08 A 1 4992 4992 12.01.2020_99909900 - A
    13.01.2020 13 Item M ABC122 1 10 10 1E+08 A 1 10 10 13.01.2020_99909900 - A
    Worksheet: arrAllDts
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

  4. #4
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    In support of this Thread
    http://www.excelfox.com/forum/showthread.php/2402-Extract-Multiple-Rows-into-a-Limited-Template-based-on-Multiple-Criterias
    http://www.excelfox.com/forum/showth...iple-Criterias







    _____ Workbook: BeforeDumpTemplate.xlsm ( Using Excel 2007 32 bit )
    4 5 6 7 8 9 10 11 12 13 14 15 16 22 23 24 25 26 27 42
    Worksheet: arrRws









    _____ Workbook: BeforeDumpTemplate.xlsm ( Using Excel 2007 32 bit )
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    22
    23
    24
    25
    26
    27
    42
    Worksheet: arrRwsT
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

  5. #5
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    In support of this Thread
    http://www.excelfox.com/forum/showthread.php/2402-Extract-Multiple-Rows-into-a-Limited-Template-based-on-Multiple-Criterias
    http://www.excelfox.com/forum/showth...iple-Criterias



    Code:
    Option Explicit
    Sub DoItForADay()
    Rem 1 Worksheets info
    Dim WsTp As Worksheet, WsDta As Worksheet, WsSmry As Worksheet
     Set WsTp = ThisWorkbook.Worksheets("Template"): Set WsDta = ThisWorkbook.Worksheets("Datadump"): Set WsSmry = ThisWorkbook.Worksheets("Summary")
    Rem 2 The days and source list
    ' 2a) Put all info in an array
    Dim LrDta As Long: Let LrDta = WsDta.Range("A" & WsDta.Rows.Count & "").End(xlUp).Row
    Dim arrAllDts() As Variant           '  In the naxt line, the  .Value  Property ( method ) , is used to return in one go all  Values  in the range.  They are returned as a field, ( array ) of values in  held in  Variant  type  elements.  So we must use Variant for the  Dim ing  of the type of our Elements, or else the next code line will error , with a  Mismatch error
     Let arrAllDts = WsDta.Range("A4:M" & LrDta & "").Value '  I am adding  column M  for my own amusement
    ' 2b)
    
    ' 2c) make an array with all unique identifier for each voucher
    Dim Cnt As Long
        For Cnt = 1 To UBound(arrAllDts(), 1) ' Looping effectively from forth row until last row in  Datadump
    Dim Idt As String
         Let Idt = arrAllDts(Cnt, 1) & "_" & arrAllDts(Cnt, 8) & " - " & arrAllDts(Cnt, 9) '  I am adding a  "_"  to in between the   date   and   source info  : Later I can split the   unique identifiers  string by this  "_"  in order to get the date and souce info
         Let arrAllDts(Cnt, 13) = Idt
        Dim strDtsSrc As String
            If InStr(1, strDtsSrc, Idt, vbBinaryCompare) = 0 Then
             Let strDtsSrc = strDtsSrc & Idt & "###"
            Else
            ' case we already have the date in our string,  strDts
            End If
        Next Cnt
     Let strDtsSrc = Left(strDtsSrc, (Len(strDtsSrc) - 3)) '  take off the last space  "###"  which we do not need
     'Debug.Print strDtsSrc
    ' 2d)
    Dim arrUnicDtsSrc() As String
     Let arrUnicDtsSrc() = Split(strDtsSrc, "###", -1)
     Let Worksheets("arrUnicDtsSrc").Range("A1").Resize(1, (UBound(arrUnicDtsSrc()) + 1)).Value = arrUnicDtsSrc()      '    arrUnicDtsSrc().jpg  --- https://imgur.com/QX1bJMB
     Worksheets("arrUnicDtsSrc").Columns.AutoFit
     Let Worksheets("arrAllDts").Range("A4:M" & LrDta & "").Value = arrAllDts()
     ' The next code line can be removed to get all the 19 worksheets
     ReDim arrUnicDtsSrc(0 To 0): Let arrUnicDtsSrc(0) = "01.01.2020_99909900 - A" ' ***** I am limiting it to the first unique identifier, ( 01.01.2020_99909900 - A ) just for demo purposes. If you remove this line,  then you will see that all dates and sources  will be considered
    Rem 3                               ' === Main Outer loop ============================================================
    Dim Stear As Variant    '   For Each  unique identifier  . In VBA,
        For Each Stear In arrUnicDtsSrc() ' Doing stuff For Each  unique identifier
        '3a) work out how many rows and which row indicies with the current unique identifier
        Dim DteSrcRwCnt As Long
            For Cnt = 1 To UBound(arrAllDts(), 1) ' ----------------------Going through all data rows
             If arrAllDts(Cnt, 13) = CStr(Stear) Then ' I am looking for rows in the main datadump that have the current unique identifier
            '3a)(i) counting rows
                                                                               ' Debug.Print Cnt + 3 & " " & arrAllDts(Cnt, 13)
              Let DteSrcRwCnt = DteSrcRwCnt + 1  '  counting the rows for the current unique identifier
             '3a)(ii) get the (row) indicies for the current unique identifier. Later i need the row number of all the rows corresponding to the current unique identifier
             Dim strRws As String
              Let strRws = strRws & Cnt + 3 & " " ' I later wont the actual row in the datadump worksheet, so that is 3 higher than the "row" number in  arrAllDts()  because I captured just the range from the 4th row  --    "A4:M........
             Else
             End If
            Next Cnt                              ' ----------------------Going through all data rows
         Let strRws = Left(strRws, (Len(strRws) - 1))   ' Take of last  " "  which I do not need
        Dim arrRws() As String ' The VBA string function returns field of string type elements. So I must Dim my array elements appropriately
         Let arrRws() = Split(strRws, " ", -1, vbBinaryCompare) ' This gives us an array which is the row numbers  in the  Datadump  for this unique identifier
         Let ThisWorkbook.Worksheets("arrRws").Range("A1").Resize(1, (UBound(arrRws()) + 1)).Value = arrRws() '   arrRws().JPG - https://imgur.com/HDgpyQq                          -
         ThisWorkbook.Worksheets("arrRws").Columns.AutoFit
        '3b) In the  "Magic Code line"  below we need a  "vertical" array     https://www.excelforum.com/excel-new-users-basics/1099995-application-index-with-look-up-rows-and-columns-arguments-as-vba-arrays.html#post4571172
        Dim arrRwsT() As Long
         ReDim arrRwsT(1 To UBound(arrRws()) + 1, 1 To 1) ' a  "Vertical"  1 column array
            For Cnt = 1 To UBound(arrRws()) + 1
             Let arrRwsT(Cnt, 1) = arrRws(Cnt - 1)
            Next Cnt
        Let ThisWorkbook.Worksheets("arrRwsT").Range("A1:A" & UBound(arrRws()) + 1 & "").Value = arrRwsT()  '                             -         arrRwsT().JPG - https://imgur.com/syf0PaZ
        Rem 4 Make Vouchers for current unique identifier, Stear
        ' 4a)
        Dim arrVouch() As Variant    '     https://www.excelforum.com/excel-new-users-basics/1099995-application-index-with-look-up-rows-and-columns-arguments-as-vba-arrays.html#post4571172
         Let arrVouch() = WsTp.Range("A1:K24").Value
        ' 4b) An array just containing the rows for the current Idt
        Dim Clms() As Variant: Let Clms() = Evaluate("=Column(A:N)")    '   {1, 2, 3, 4......14} -   Clms().jpg  -  https://imgur.com/xHlUeH9
        Dim arrDtsSrc() As Variant  '    For   "Magic Code line"     https://www.excelforum.com/excel-new-users-basics/1099995-application-index-with-look-up-rows-and-columns-arguments-as-vba-arrays.html#post4571172
         Let arrDtsSrc() = Application.Index(WsDta.Cells, arrRwsT(), Clms())  ' - --"Magic Code line"      -  arrDtsSrc().JPG : https://imgur.com/0c8SgIn
         Let ThisWorkbook.Worksheets("arrDtsSrc").Range("A1").Resize(UBound(arrDtsSrc(), 1), UBound(arrDtsSrc(), 2)).Value = arrDtsSrc() '                             -         arrRwsT().JPG - https://imgur.com/syf0PaZ
        Dim RwCnt As Long: Let RwCnt = 1: Let Cnt = 1
        ' 4c)
            Do While RwCnt < DteSrcRwCnt + 1 ' ............................................
                Do While Cnt < 11 ' _________________________________|
                 '   Fill in values in Voucher Array
                 Let arrVouch(Cnt + 9, 1) = "'" & arrDtsSrc(RwCnt, 2)   '  The extra   "'"   is one way to keep the leading 0s
                 Let arrVouch(Cnt + 9, 4) = arrDtsSrc(RwCnt, 3)    '   Detail  ( Item )
                 Let arrVouch(Cnt + 9, 7) = arrDtsSrc(RwCnt, 4)    '   Unit Code
                 Let arrVouch(Cnt + 9, 9) = arrDtsSrc(RwCnt, 11)    '   Value
                 Let Cnt = Cnt + 1
                 Let RwCnt = RwCnt + 1
                Loop ' While Cnt < 11 ' ______________________________|
             Let arrVouch(6, 3) = Split(Stear, "_", 2, vbBinaryCompare)(1) ' The second array element (1) is  source code & source name  ( The first array element (0) is the date )
             Let arrVouch(4, 10) = Split(Stear, "_", 2, vbBinaryCompare)(0) ' The first array element (0) is the date
             Let Cnt = 1                       ' back to first row for a template
         '4d) Information to the summary sheet.
            Dim NxtVch As Long: Let NxtVch = WsSmry.Range("A" & WsSmry.Rows.Count & "").End(xlUp).Row
             Let WsSmry.Range("A" & NxtVch + 1 & "").Value = "V" & Format(NxtVch, "0000")
             Let WsSmry.Range("B" & NxtVch + 1 & "").Value = Split(Stear, "_", 2, vbBinaryCompare)(0)
             WsSmry.Hyperlinks.Add Anchor:=WsSmry.Range("C" & NxtVch + 1 & ""), Address:="", SubAddress:="V" & Format(NxtVch, "0000") & "!A1", TextToDisplay:="Go To Sheet"
         '4e)  Add next voucher
             WsTp.Copy After:=WsDta
             Let ActiveSheet.Name = "V" & Format(NxtVch, "0000")
             Let ThisWorkbook.Worksheets("arrVouch").Range("A1").Resize(UBound(arrVouch(), 1), UBound(arrVouch(), 2)).Value = arrVouch() '                             -         arrRwsT().JPG - https://imgur.com/syf0PaZ
             Let ActiveSheet.Range("A1").Resize(UBound(arrVouch(), 1), UBound(arrVouch(), 2)).Value = arrVouch()
             Let arrVouch() = WsTp.Range("A1:K24").Value  ' get a new template array
        
            Loop ' While RwCnt < DteSrcRwCnt ' .............................................
    
         Let DteSrcRwCnt = 0 ' ready for next Idt Stear
        Next Stear         ' === Main Outer loop =========================================================================
    
    End Sub
    Attached Files Attached Files
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Testing Concatenating with styles
    By DocAElstein in forum Test Area
    Replies: 2
    Last Post: 12-20-2020, 02:49 AM
  2. testing
    By Jewano in forum Test Area
    Replies: 7
    Last Post: 12-05-2020, 03:31 AM
  3. Replies: 18
    Last Post: 03-17-2019, 06:10 PM
  4. Concatenating your Balls
    By DocAElstein in forum Excel Help
    Replies: 26
    Last Post: 10-13-2014, 02:07 PM
  5. Replies: 1
    Last Post: 12-04-2012, 08:56 AM

Posting Permissions

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