Page 16 of 38 FirstFirst ... 6141516171826 ... LastLast
Results 151 to 160 of 380

Thread: Appendix Thread. ( Codes for other Threads, etc.) Event Coding Drpdown Data validation

  1. #151
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10

    Some Killing File tests / What order does Dir(with wild cards) find stuff

    Some notes , tests in support of this
    https://www.excelforum.com/excel-pro...-the-file.html
    These are just some notes and tests into what order the Dir( with wild cards ) thing does stuff.


    Introduction
    VBA Dir Function thing ( https://docs.microsoft.com/en-us/off...p/dir-function )
    In the simplest form, ….._
    _____ Dir(Fullpath&FileName, __ )
    _............
    Code:
    Dim IsFileName As String
      IsFileName = Dir("C:\MyFolder\myFileName.xls", __ )
    this basically gives you the file name back if it exists, based on you giving it the full path and File name string, Fullpath&FileName.
    In the above example, if you had the file "myFileName.xls" in the foilder, "MyFolder", then the text "myFileName.xls" would be Placed in variable , IsFileName
    If that file does not exist, then it gives you back nothing, or rather an empty string of sorts “” ( I believe Dir is a throw back to older early computer days, when you typed something like Dir C:_____, and the result was that you got to go to that place which Dir C:_____ represented )
    It seem that in VBA the Dir is mostly used to loop through all files in a single folder*. ( *It does not suit too well for use in coding looking at all files in folders and sub folders ). The suitability of the Dir function for this is based on a couple of things.
    _(i) In Microsoft Windows, Dir supports the use of multiple character (*) and single character (?) wildcards to specify multiple files. ......
    You can use wild cards in the full path and file name string that you give it, so it will look for a file matching your given string. ( So typically you might give a string like “C:\myFolder\*.xl*”, which would look for any excel file: In this bit *.xl* , the first * allows for any file name, and the second * will allow for extensions such as .xls , .xlsm, .xlsx, .. etc… )
    __Dir _____ without arguments
    Code:
      IsFileName = Dir
    _(ii) After you use like Dir(Fullpath&FileName, __ ) once, then any use after of just _ Dir __ without any arguments, will give the next file it finds based on the criteria given by the wild carded full path and file name string you gave in the first use with arguments, or it returns "" if there are no further files meeting the criteria given by the wild carded full path and file name string you gave in the first use with arguments

    What this post is about:
    My interest was sparked by the reference thread ( https://www.excelforum.com/excel-pro...-the-file.html )
    I am interested in finding out which of the files Dir or Dir(Fullpath&FileName, __ )will choose if there are more than 1 file meeting the criteria of a string , Fullpath&FileName , containing wild cards




    Experiments so far
    I made a test folder , named "Folder"
    Folder.JPG : https://imgur.com/l9OwlQi
    Attachment 2213

    I created my files in this order
    _1 “wbCodes.xlsm” --- the main file with all the codes in it. This is in the same Folder as the folder which I named "Folder" ( The main Folder is called “Kill Stuff” : Kill Stuff Folder.JPG : https://imgur.com/hN26AoW )
    After making the main File, I created the folder, "Folder" , and created the following files in it. I created the following three files in the following order,
    _2 “SecondFirstAfterwb.xlsx” --- made first after making “wbCodes.xlsm”
    _3 “ThirdSecondAfterwb.xlsx” --- made second after making “wbCodes.xlsm”
    _4 “AForthThirdAfterwb.xlsx” --- made third after making “wbCodes.xlsm”

    I modified the codes from Alf and sintek from the referenced Thread, thus, ( I am mainly interested in the first part of the routines, as this deals with what the Dir chooses )

    Code:
    Sub zed369() ' sintek
    Dim Path As String, File As String, Cnt As Long
    Dim wb1 As Workbook, wb2 As Workbook
    Dim ws1 As Worksheet, ws2 As Worksheet
    ' sintek's Dir Stuff
    'Application.ScreenUpdating = False
    Set wb1 = ThisWorkbook: Set ws1 = wb1.Sheets("Sheet1")
    Path = ThisWorkbook.Path & "\Folder\": File = Dir(Path & "*.xl*") ' For this example, specific file is in a folder called Folder...same path as macro file...
    Debug.Print "First got by  Dir  is " & File
    Debug.Print
        For Cnt = 1 To 3 - 1 ' -1 because we have three files, but typically the first is got from the first use of Dir , which is typically outside the loop
         File = Dir: Debug.Print " use " & Cnt & " in loop of  Dir   gives " & File
        Next Cnt
    Debug.Print
    Debug.Print
    
    
    ' sintek's way to do stuff
    'Stop ' _____________________________________________________________________________
    'Set wb2 = Workbooks.Open(Path & File): Set ws2 = wb2.Sheets("Tabelle1")
    'With ws2
    '    .UsedRange.Copy ws1.Range("A1")
    'End With
    'wb2.Close
    'Kill Path & File
    'Application.ScreenUpdating = True
    End Sub
    '
    Sub CopyAndKill() ' Alf
    Dim aString As String, Cnt As Long, aStringToOpen As String
    ' Alf's Dir stuff
    'aString = Dir("N:\a_test\")
    aString = Dir("F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\")
    Debug.Print "First got by  Dir  is " & aString
    aStringToOpen = "F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\" & Dir("F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\")
    Debug.Print "First file will be opened using this string  " & vbCrLf & aStringToOpen
    Debug.Print
        For Cnt = 1 To 3 - 1 ' -1 because we have three files, but typically the first is got from the first use of Dir , which is typically outside the loop
         aString = Dir: Debug.Print " use " & Cnt & " in loop of  Dir   gives " & aString
        Next Cnt
    Debug.Print
    Debug.Print
    
    
    'Stop ' __________________________________________________________________
    ' Alf's way to do the stuff
    'Workbooks.Open ("N:\a_test\" & Dir("N:\a_test\"))
    'Sheets("Sheet1").Activate
    'ActiveSheet.UsedRange.Copy
    'ThisWorkbook.ActiveSheet.Range("A1").PasteSpecial Paste:=xlAll
    'Application.CutCopyMode = False
    'Windows(aString).Close
    'Kill ("N:\a_test\" & Dir("N:\a_test\"))
    End Sub
    I get this sort of output ( in the immediate window )
    Code:
     First got by  Dir  is AForthThirdAfterwb.xlsx
    
     use 1 in loop of  Dir   gives SecondFirstAfterwb.xlsx
     use 2 in loop of  Dir   gives ThirdSecondAfterwb.xlsx
    
    
    First got by  Dir  is AForthThirdAfterwb.xlsx
    First file will be opened using this string  
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\AForthThirdAfterwb.xlsx
    
     use 1 in loop of  Dir   gives SecondFirstAfterwb.xlsx
     use 2 in loop of  Dir   gives ThirdSecondAfterwb.xlsx
    Initially it appears that I get alphabetic order.
    But possibly there could be more to it than that.
    I will look again at this in a few days , possibly on some other computers and systems, and experiment with various settings , etc….




    In the next posts I will use this simplified routine which is only interested in looking at the order in which Dir chooses files.
    Rem 1 gives a few ways to get the string up to and including the Folder in which files are to be searched for, ( in the form below , ‘1b ) , is used to get the folder named “Folder” in the same folder as the workbook in which the routine is placed )
    Rem 2 : As before, an initial use of Dir(C:\somewhers\kjhfkhs.*sdfjkah,___) is made to set the search criteria, followed by the un argumented Dir in a loop which then looks for the next files
    Code:
    Sub DirOrder()
    Dim strWB As String
    Rem 1 get the full string, strWB, for a Folder to use in the  Dir(Fullpath&FileName, __ )        ( strWB=Fullpath&FileName - FileName )
    '1a) use the asking pop up thing, File dialogue folder picker
    '   With Application.FileDialog(msoFileDialogFolderPicker)
    '    .Title = "Folder Select"
    '    .AllowMultiSelect = False
    '        If .Show <> -1 Then
    '         Exit Sub
    '        Else
    '        End If
    '    Let strWB = .SelectedItems(1)  '  & "\"
    '   End With
    '
    '1b) Using a test Folder, named  Folder  in the same Folder as the workbook in which this code is
     Let strWB = ThisWorkbook.Path & "\Folder"
    '1c) Hard code instead
    'Let strWB = "F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder"
     Debug.Print "Folder used is" & vbCrLf & strWB & vbCrLf & "" & Right(strWB, (Len(strWB) - InStrRev(strWB, "\", -1, vbTextCompare)))
     Debug.Print
     Let strWB = strWB & "\"
    Rem 2 add last file bit for use in the  Dir(Fullpath&FileName, __ ) , but include wild cards...    http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11089&viewfull=1#post11089 :  _(i) You can use wild cards in the full path and file name string that you give it, so it will look for a file matching your given string. ( So typically you might give a string like “C:\myFolder\*.xl*”, which would look for any excel file: In this bit *.xl* , the first * allows for any file name, and the second * will allow for extensions such as .xls , .xlsm, .xlsx, .. etc… )      _(ii) After you use like Dir(Fullpath&FileName, __ ) once, then any use after of just _ Dir __ without any arguments, will give the next file it finds based on the string you gave in the first use with arguments
    '2a)  Excel files
     Let strWB = strWB & "*.xls*"
    Dim file As String: Let file = Dir(strWB)
     Debug.Print "First got by  Dir(" & strWB & ")" & vbCrLf & "is             " & file
     Debug.Print
    Dim Cnt As Long
        For Cnt = 1 To 3 - 1 ' -1 because we have three files, but typically the first is got from the first use of Dir , which is typically outside the loop
         file = Dir: Debug.Print "Use " & Cnt & " in loop of unargumented   Dir   gives   " & file
        Next Cnt
     Debug.Print
     Debug.Print
    End Sub
    This would be comparible output ( in the Immedite Window ( http://www.eileenslounge.com/viewtop...247121#p247121 ) ) to the test files anf folder used so far

    HTML Code:
    Folder used is
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder
    Folder
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   SecondFirstAfterwb.xlsx
    Use 2 in loop of unargumented   Dir   gives   ThirdSecondAfterwb.xlsx
    And here is what it looks like in the explorer window:
    ExpOrder1.JPG : https://imgur.com/OfQfHeH
    Attachment 2224
    Attached Images Attached Images

  2. #152
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10

    Dir Order

    Here is where we left off in the last post
    HTML Code:
    Folder used is
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder
    Folder
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   SecondFirstAfterwb.xlsx
    Use 2 in loop of unargumented   Dir   gives   ThirdSecondAfterwb.xlsx
    here is what it looks like in the explorer window:
    ExpOrder1.JPG : https://imgur.com/OfQfHeH


    I can move the order pysically in the explorer window, by selecting and dragging the file position virtically, ( and I hit the refresh thing , just in case that should influence anything )
    ExpOrder2.JPG : https://imgur.com/AlV1MdB
    The routine, Sub DirOrder() , then seems to give the same results
    HTML Code:
    Folder used is
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder
    Folder
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   SecondFirstAfterwb.xlsx
    Use 2 in loop of unargumented   Dir   gives   ThirdSecondAfterwb.xlsx


    I can do this:
    ExpOrder3a.JPG : https://imgur.com/RBSa9Ou
    ExpOrder3a.JPG : https://imgur.com/2OVsguZ
    Once again I get the same alphabetical ordering in the Dir found order output

    i can play around with this:
    ExpOrder4.JPG : https://imgur.com/6FbYQgp
    or this
    Stack by change date.jpg : https://imgur.com/YIrTxpp , https://imgur.com/ht887FU , https://imgur.com/lHMcUjA
    Attachment 2226
    Once again I get the same alphabetical ordering in the Dir found order output


    I made this d_xlsm_file.xlsm , and this ,c_xls_file.xls , and pit it in the foilder, Folder
    A xlsm and xls.JPG : https://imgur.com/w9gyRxj
    Attachment 2225
    here is part of my Immediate window output
    HTML Code:
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   c_xls_file.xls
    Use 2 in loop of unargumented   Dir   gives   d_xlsm_file.xlsm
    I need to increase my loop count, Cnt , to 4 to getting total all 5 files. But doing this is likely to get a bit tedious as I comtinue experiments with a different number of files in various folders. So I will change my coding, at the loop section, to a more typical type of loop used iin such a Dir __ file finding code: Usually something like this is done, so that the loop keeps going as long as Dir __ finds files
    Code:
     
    ‘ First use of Dir  with full path and file name argument
    ‘  strWB = "F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*" ‘ Wild card to get all Excel Files
    ‘  File = Dir(strWB)‘ Loop for all files meeting search string criteria,  ( all Excel files in this example )
        Do '                  '_- I want to keep going in a Loop while I still get a file name returned by  Dir
        Dim Cnt As  Long: Let Cnt = Cnt + 1
         File = Dir: Debug.Print "Use " & Cnt & " in loop of unargumented   Dir   gives   """ & File & """"
        Loop While File <> "" '_- I want to keep going in a Loop while I still get a file name returned by  Dir
    Here is the full coding, http://www.excelfox.com/forum/showth...ll=1#post11108 , which gives for the last example:
    HTML Code:
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder
    Folder
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*.xls*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   "c_xls_file.xls"
    Use 2 in loop of unargumented   Dir   gives   "d_xlsm_file.xlsm"
    Use 3 in loop of unargumented   Dir   gives   "SecondFirstAfterwb.xlsx"
    Use 4 in loop of unargumented   Dir   gives   "ThirdSecondAfterwb.xlsx"
    Use 5 in loop of unargumented   Dir   gives   ""


    I can change the serach criteria from strWB & "*.xls*" to strWB & "*" and it has no effect

    i added a .jpg pic, ( Add a jpg.JPG : https://imgur.com/XkXskiL ) , and the listing had it in the aplhabetical order :
    Code:
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder\*)
    is             AForthThirdAfterwb.xlsx
    
    Use 1 in loop of unargumented   Dir   gives   "c_xls_file.xls"
    Use 2 in loop of unargumented   Dir   gives   "d_xlsm_file.xlsm"
    Use 3 in loop of unargumented   Dir   gives   "SecondFirstAfterwb.xlsx"
    Use 4 in loop of unargumented   Dir   gives   "Stack by change date  .JPG"
    Use 5 in loop of unargumented   Dir   gives   "ThirdSecondAfterwb.xlsx"
    Use 6 in loop of unargumented   Dir   gives   ""

    I use the last routine in the form to allow user selection of the folder to search for files
    http://www.excelfox.com/forum/showth...ll=1#post11108. I looked at some arbritrary folders, - once again alphabetical order seems to come out:
    Code:
    Folder used is
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery
    wbSheetMakerClsdWbADOMsQueery
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\*)
    is             83DB8900
    
    Use 1 in loop of unargumented   Dir   gives   "aaa.xlsm"
    Use 2 in loop of unargumented   Dir   gives   "Amar321.xls.xlsx"
    Use 3 in loop of unargumented   Dir   gives   "ApparantlyApparantIs_Change.JPG"
    Use 4 in loop of unargumented   Dir   gives   "Aufzeichnen.JPG"
    Use 5 in loop of unargumented   Dir   gives   "Book1.xls"
    Use 6 in loop of unargumented   Dir   gives   "Book1.xlsm.zip"
    Use 7 in loop of unargumented   Dir   gives   "CA930CD8.tmp"
    Use 8 in loop of unargumented   Dir   gives   "ClosedWorkbook.xlsm"
    Use 9 in loop of unargumented   Dir   gives   "CopyASheet.JPG"
    Use 10 in loop of unargumented   Dir   gives   "CresssieFiles.JPG"
    Use 11 in loop of unargumented   Dir   gives   "DB2IssJfürELProAbDec2014.xlsm"
    Use 12 in loop of unargumented   Dir   gives   "EFFldr.xlsm"
    Use 13 in loop of unargumented   Dir   gives   "EFldr1_1 Download.JPG"
    Use 14 in loop of unargumented   Dir   gives   "Eileens Fldr.zip"
    Use 15 in loop of unargumented   Dir   gives   "EileensFldr Contents Copy.JPG"
    Use 16 in loop of unargumented   Dir   gives   "EileensFldr Contents Paste.JPG"
    Use 17 in loop of unargumented   Dir   gives   "EileensFldr Make Empty Folder.JPG"
    Use 18 in loop of unargumented   Dir   gives   "EileensFldr zip  Download.JPG"
    Use 19 in loop of unargumented   Dir   gives   "EileensFldr.zip"
    Use 20 in loop of unargumented   Dir   gives   "EileensFolderExplainedOutput.JPG"
    Use 21 in loop of unargumented   Dir   gives   "Example Folder and Macro File in same Folder.JPG"
    Use 22 in loop of unargumented   Dir   gives   "FBandData.xlsm"
    Use 23 in loop of unargumented   Dir   gives   "FBandDataNorie.xlsm"
    Use 24 in loop of unargumented   Dir   gives   "FBandDataNorie.xlsx"
    Use 25 in loop of unargumented   Dir   gives   "FormulaBarClosedWB.JPG"
    Use 26 in loop of unargumented   Dir   gives   "GetData_ClosedBook+LINKS.xlsx"
    Use 27 in loop of unargumented   Dir   gives   "GetData_ClosedBook.xls"
    Use 28 in loop of unargumented   Dir   gives   "HimanshuktwCode.JPG"
    Use 29 in loop of unargumented   Dir   gives   "KissMyClosedWB.JPG"
    Use 30 in loop of unargumented   Dir   gives   "Mappe2.xlsm"
    Use 31 in loop of unargumented   Dir   gives   "MazanDikCollectionWonk.xlsm"
    Use 32 in loop of unargumented   Dir   gives   "mellowtangSummarySheets.xlsm"
    Use 33 in loop of unargumented   Dir   gives   "MsQueerOptions.JPG"
    Use 34 in loop of unargumented   Dir   gives   "myFileToClose.xlsm"
    Use 35 in loop of unargumented   Dir   gives   "MyNewWorkbook.xlsx"
    Use 36 in loop of unargumented   Dir   gives   "MySameFolder.JPG"
    Use 37 in loop of unargumented   Dir   gives   "NeuProAktuelleMakros.xlsm"
    Use 38 in loop of unargumented   Dir   gives   "NormalThisWorkbookCodeModule.JPG"
    Use 39 in loop of unargumented   Dir   gives   "NutritionalValues2016.xlsx"
    Use 40 in loop of unargumented   Dir   gives   "OnlyGets8810RowsInAQuerrListObjectTableThingyAnyways.JPG"
    Use 41 in loop of unargumented   Dir   gives   "Plop.xlsm"
    Use 42 in loop of unargumented   Dir   gives   "poo.xlsm"
    Use 43 in loop of unargumented   Dir   gives   "RudyMSRAllSubFldrsFndRep.xlsm"
    Use 44 in loop of unargumented   Dir   gives   "Sample.zip"
    Use 45 in loop of unargumented   Dir   gives   "SchemaIniErrorPipe.JPG"
    Use 46 in loop of unargumented   Dir   gives   "SrangeThisWorkbookCodeModule.JPG"
    Use 47 in loop of unargumented   Dir   gives   "StopClosing.xlsm"
    Use 48 in loop of unargumented   Dir   gives   "Summary sheet.xlsm"
    Use 49 in loop of unargumented   Dir   gives   "template test.xlsm"
    Use 50 in loop of unargumented   Dir   gives   "Top100MsQuery.JPG"
    Use 51 in loop of unargumented   Dir   gives   "ViskasVerticalsMaster dataMjoza.xlsm"
    Use 52 in loop of unargumented   Dir   gives   "wb2.csv"
    Use 53 in loop of unargumented   Dir   gives   "wb2.xlsm"
    Use 54 in loop of unargumented   Dir   gives   "wb2.xlsx"
    Use 55 in loop of unargumented   Dir   gives   "WBAccessTimeTestData.xlsx"
    Use 56 in loop of unargumented   Dir   gives   "WBAccestTimeTest.xlsm"
    Use 57 in loop of unargumented   Dir   gives   "wbCodes.xlsb"
    Use 58 in loop of unargumented   Dir   gives   "wbCodes.xlsm"
    Use 59 in loop of unargumented   Dir   gives   "WBOpenRenameKlaredog.xls"
    Use 60 in loop of unargumented   Dir   gives   "WBOpenRenameKlaredog.xlsm"
    Use 61 in loop of unargumented   Dir   gives   "Wb_with_5Sheets_4Worksheets.xlsm"
    Use 62 in loop of unargumented   Dir   gives   "WillyWonks.JPG"
    Use 63 in loop of unargumented   Dir   gives   "workbook2.xlsm"
    Use 64 in loop of unargumented   Dir   gives   "WorkbookOpenMsgBox.JPG"
    Use 65 in loop of unargumented   Dir   gives   "WorksheetNames.JPG"
    Use 66 in loop of unargumented   Dir   gives   "Worksheet_Change.JPG"
    Use 67 in loop of unargumented   Dir   gives   ""
    Note that a file named as a number comes first in the list, as is consitant with Excel regarding text as "larger" than a number in sorting things http://www.eileenslounge.com/viewtop...=32154#p249178


    Up until now, all tests were done on an old Lap top using Vista operating system. I rechecked on a newer machine uisng Windows 7. I get the same results














    "wbCodes.xlsm" : https://app.box.com/s/gfuintgifu1hgw5nap3jriz2x8mp911x ( Sub DirOrder() is here )
    folder, "Folder" : https://app.box.com/s/vmmzeboetkt07ocggbx6p8lkurmp5wca
    "wbCodes.xls" : https://app.box.com/s/gmdne53vehhuc6lvz3vfgyxqmwy07xlz ( Sub DirOrder() is here )
    Attached Images Attached Images

  3. #153
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    There is a second argument to Dir. It is not used much. https://docs.microsoft.com/en-us/off...ction#settings
    One option will make it return folder names as well. For our example we can change Dir(strWB) to any if these: Dir(strWB, vbDirectory) ; Dir(PathName:=strWB, Attributes:=vbDirectory) ; Dir(PathName:=strWB, Attributes:=16) ; Dir(strWB, 16)
    Running the routine with the previous example, seems to slip the folder names in the appropriate place to once again have everything in alphabetical order
    Code:
    Folder used is
    F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery
    wbSheetMakerClsdWbADOMsQueery
    
    First got by  Dir(F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\*)
    is             .
    
    Use 1 in loop of unargumented   Dir   gives   ".."
    Use 2 in loop of unargumented   Dir   gives   "83DB8900"
    Use 3 in loop of unargumented   Dir   gives   "aaa.xlsm"
    Use 4 in loop of unargumented   Dir   gives   "ACDC"
    Use 5 in loop of unargumented   Dir   gives   "Amar321.xls.xlsx"
    Use 6 in loop of unargumented   Dir   gives   "ApparantlyApparantIs_Change.JPG"
    Use 7 in loop of unargumented   Dir   gives   "Aufzeichnen.JPG"
    Use 8 in loop of unargumented   Dir   gives   "Bad Files"
    Use 9 in loop of unargumented   Dir   gives   "Book1.xls"
    Use 10 in loop of unargumented   Dir   gives   "Book1.xlsm.zip"
    Use 11 in loop of unargumented   Dir   gives   "CA930CD8.tmp"
    Use 12 in loop of unargumented   Dir   gives   "ClosedWorkbook.xlsm"
    Use 13 in loop of unargumented   Dir   gives   "ClsdWbs"
    Use 14 in loop of unargumented   Dir   gives   "CopyASheet.JPG"
    Use 15 in loop of unargumented   Dir   gives   "CressieFolder"
    Use 16 in loop of unargumented   Dir   gives   "CresssieFiles.JPG"
    Use 17 in loop of unargumented   Dir   gives   "DB2IssJfürELProAbDec2014.xlsm"
    Use 18 in loop of unargumented   Dir   gives   "EFFldr.xlsm"
    Use 19 in loop of unargumented   Dir   gives   "EFldr1_1"
    Use 20 in loop of unargumented   Dir   gives   "EFldr1_1 Download.JPG"
    Use 21 in loop of unargumented   Dir   gives   "Eileens Fldr.zip"
    Use 22 in loop of unargumented   Dir   gives   "EileensFldr"
    Use 23 in loop of unargumented   Dir   gives   "EileensFldr Contents Copy.JPG"
    Use 24 in loop of unargumented   Dir   gives   "EileensFldr Contents Paste.JPG"
    Use 25 in loop of unargumented   Dir   gives   "EileensFldr Make Empty Folder.JPG"
    Use 26 in loop of unargumented   Dir   gives   "EileensFldr zip  Download.JPG"
    Use 27 in loop of unargumented   Dir   gives   "EileensFldr.zip"
    Use 28 in loop of unargumented   Dir   gives   "EileensFolderExplainedOutput.JPG"
    Use 29 in loop of unargumented   Dir   gives   "Example Folder and Macro File in same Folder.JPG"
    Use 30 in loop of unargumented   Dir   gives   "FBandData.xlsm"
    Use 31 in loop of unargumented   Dir   gives   "FBandDataNorie.xlsm"
    Use 32 in loop of unargumented   Dir   gives   "FBandDataNorie.xlsx"
    Use 33 in loop of unargumented   Dir   gives   "FormulaBarClosedWB.JPG"
    Use 34 in loop of unargumented   Dir   gives   "GetData_ClosedBook+LINKS.xlsx"
    Use 35 in loop of unargumented   Dir   gives   "GetData_ClosedBook.xls"
    Use 36 in loop of unargumented   Dir   gives   "HimanshuktwCode.JPG"
    Use 37 in loop of unargumented   Dir   gives   "Kill Stuff"
    Use 38 in loop of unargumented   Dir   gives   "KissMyClosedWB.JPG"
    Use 39 in loop of unargumented   Dir   gives   "MacroRecording"
    Use 40 in loop of unargumented   Dir   gives   "Mappe2.xlsm"
    Use 41 in loop of unargumented   Dir   gives   "MazanDikCollectionWonk.xlsm"
    Use 42 in loop of unargumented   Dir   gives   "mellowtangSummarySheets.xlsm"
    Use 43 in loop of unargumented   Dir   gives   "MsQueerOptions.JPG"
    Use 44 in loop of unargumented   Dir   gives   "MsQueeryADO"
    Use 45 in loop of unargumented   Dir   gives   "myFileToClose.xlsm"
    Use 46 in loop of unargumented   Dir   gives   "MyNewWorkbook.xlsx"
    Use 47 in loop of unargumented   Dir   gives   "MySameFolder.JPG"
    Use 48 in loop of unargumented   Dir   gives   "Neuer Ordner"
    Use 49 in loop of unargumented   Dir   gives   "NeuProAktuelleMakros.xlsm"
    Use 50 in loop of unargumented   Dir   gives   "NormalThisWorkbookCodeModule.JPG"
    Use 51 in loop of unargumented   Dir   gives   "NutritionalValues2016.xlsx"
    Use 52 in loop of unargumented   Dir   gives   "OnlyGets8810RowsInAQuerrListObjectTableThingyAnyways.JPG"
    Use 53 in loop of unargumented   Dir   gives   "Plop.xlsm"
    Use 54 in loop of unargumented   Dir   gives   "poo.xlsm"
    Use 55 in loop of unargumented   Dir   gives   "RudyMSRAllSubFldrsFndRep.xlsm"
    Use 56 in loop of unargumented   Dir   gives   "Sample.zip"
    Use 57 in loop of unargumented   Dir   gives   "SchemaIniErrorPipe.JPG"
    Use 58 in loop of unargumented   Dir   gives   "SrangeThisWorkbookCodeModule.JPG"
    Use 59 in loop of unargumented   Dir   gives   "StopClosing.xlsm"
    Use 60 in loop of unargumented   Dir   gives   "Summary sheet.xlsm"
    Use 61 in loop of unargumented   Dir   gives   "template test.xlsm"
    Use 62 in loop of unargumented   Dir   gives   "Top100MsQuery.JPG"
    Use 63 in loop of unargumented   Dir   gives   "ViskasVerticalsMaster dataMjoza.xlsm"
    Use 64 in loop of unargumented   Dir   gives   "wb2.csv"
    Use 65 in loop of unargumented   Dir   gives   "wb2.xlsm"
    Use 66 in loop of unargumented   Dir   gives   "wb2.xlsx"
    Use 67 in loop of unargumented   Dir   gives   "WBAccessTimeTestData.xlsx"
    Use 68 in loop of unargumented   Dir   gives   "WBAccestTimeTest.xlsm"
    Use 69 in loop of unargumented   Dir   gives   "wbCodes.xls"
    Use 70 in loop of unargumented   Dir   gives   "wbCodes.xlsb"
    Use 71 in loop of unargumented   Dir   gives   "wbCodes.xlsm"
    Use 72 in loop of unargumented   Dir   gives   "WBOpenRenameKlaredog.xls"
    Use 73 in loop of unargumented   Dir   gives   "WBOpenRenameKlaredog.xlsm"
    Use 74 in loop of unargumented   Dir   gives   "Wb_with_5Sheets_4Worksheets.xlsm"
    Use 75 in loop of unargumented   Dir   gives   "WillyWonks.JPG"
    Use 76 in loop of unargumented   Dir   gives   "WonkBook"
    Use 77 in loop of unargumented   Dir   gives   "workbook2.xlsm"
    Use 78 in loop of unargumented   Dir   gives   "WorkbookOpenMsgBox.JPG"
    Use 79 in loop of unargumented   Dir   gives   "WorksheetNames.JPG"
    Use 80 in loop of unargumented   Dir   gives   "Worksheet_Change.JPG"
    Use 81 in loop of unargumented   Dir   gives   "XYT"
    Use 82 in loop of unargumented   Dir   gives   ""
    Here is the folder used for the last two tests: wbFolder.JPG : https://imgur.com/MMydq7n

  4. #154
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10

    Deafault item to use if empty column

    In support of answer to this excelfox Thread:
    http://www.excelfox.com/forum/showth...ll=1#post11090


    Code:
    Option Explicit
    Sub DefaultItem()
    Rem 1 data range info
    Dim rngIn As Range, Lr As Long, ClmCnt As Long
     Let ClmCnt = 3 '                                                                                                     : Let ClmCnt = Worksheets("Sheet2").Range("A1").CurrentRegion.Columns.Count
     Let Lr = Worksheets("Sheet2").Range("A1").CurrentRegion.Rows.Count
     Set rngIn = Worksheets("Sheet2").Range("A1:C" & Lr & "")
    Rem 2 Data to array
    Dim arrDtaIn() As Variant '  I need Variant type as the  .Value  in the next line returns a field of Variant type elements
     Let arrDtaIn() = rngIn.Value
    Rem 3 Determine default values
    ' 3a) Number of groups
    Dim arrGp() As Variant: Let arrGp() = Application.Index(rngIn, 0, 1).Value ' http://www.excelfox.com/forum/showthread.php/1111-VBA-Trick-of-the-Week-Slicing-an-Array-Without-Loop-%E2%80%93-Application-Index         Highlight arrGp and Hit F9.JPG : https://imgur.com/PZF0oXE
    Dim strGps As String: Let strGps = " " ' For a string like " 1 2 3 "
    Dim cnt As Long
        For cnt = 2 To Lr ' looking at all rows from the second in our input data
            If InStr(1, strGps, " " & arrGp(cnt, 1) & " ") = 0 Then ' This looks for the positiopn along ( starting from character 1  ,  in  strGps  ,  of  each row element arrGp(cnt, 1)  )    if it is not found then Instr retourns  0   as a n indication that it was not there
             Let strGps = strGps & arrGp(cnt, 1) & " "              ' Because it is not there, we now put it in
            Else
            End If
        Next cnt
    ' At this point we should have like  strGps = " 1 2 3 "
    ' 3b) Array of unique groups
     Let strGps = Trim(strGps) ' This takes off the first and last trailing spaces
    Dim arrGps() As String     ' The string split function below returns a fiels of String elements : Highlight arrGps  Hit F9.JPG : https://imgur.com/LT9dgHk
     Let arrGps() = Split(strGps, " ", -1, vbBinaryCompare)      ' this splits the (  strgps  ,  using  " " as denominator  ,  and returns all elemants in an array,  using exact binary computer match on the " "  )
    ' 3c) Array for output
    Dim arrOut() As String ' A dynamic array is needed as I can only use variables in the  ReDim  method - I cannot use varable in the declaration (Dim) statement
     ReDim arrOut(1 To UBound(arrGps()) + 2, 1 To 2) ' I  want +1 rows for the header   I also need +1 because split retouns a 1 dimensional array stating at indicie 0 - so the Ubound of arrGps() will give a numbe 1 less than I might expect - in our example we have 3 elements with  indicies of 0 1 2, ( and values in our example of 1 2 3 - for example  arrGps(0)=1  )  so the Ubound returns 2 - but we want 3 elements
    ' 3d) fill my arrOut()
    Dim Stear As Variant ' I want to use a  For ´Each  loop below   VBA must have an object varaible or a variable of variant type to hold each  item  in a collection of something. Our arrGps() can be considered a collection of numbers  1 2 3
    Dim ArrOutRw As Long: Let ArrOutRw = 1 ' Our row number in the outout array  : I use 1 initially, for the header
     Let arrOut(ArrOutRw, 1) = arrDtaIn(1, 1): Let arrOut(ArrOutRw, 2) = "Deafault item"
        For Each Stear In arrGps() ' This outer loop goes throug each unique group number =============== - For each number in  { 1, 2, 3 }
            For cnt = 2 To Lr ' An Inner loop to go through all data rows ' -----------------------------
                If CStr(arrDtaIn(cnt, 1)) = CStr(Stear) Then ' This will catch the first use of our group number, Stear is our group number taken from the array  1 2 3
                 Let ArrOutRw = ArrOutRw + 1                 ' Our next row to fill in arrOut()
                 Let arrOut(ArrOutRw, 1) = Stear             ' First column in our output array
                 Let arrOut(ArrOutRw, 2) = arrDtaIn(cnt, 2)  ' Second column in our output array will be given the first item in column B of our data for this group number, Stear
                 Exit For                                    ' I only want to get the first item for a group number
                Else
                End If
            Next cnt ' ----------------------------------------------------------------------------------
        Next Stear ' ====================================================================================
    ' at this point we have an array for output of default : Select ArrOut   then Hit F9.JPG : https://imgur.com/CNMeYV9
    Rem 4 Demo Output
    Let rngIn.Offset(0, ClmCnt).Resize(UBound(arrOut(), 1), 2).Value = arrOut() ' In the range which offset to the right of the input, of the dimension size of the output array, I paste my values out
     
    End Sub
    Attached Files Attached Files

  5. #155
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Coding in suport of these excelfox Threads and posts:
    http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11089&viewfull=1#post11089
    https://www.excelforum.com/excel-pro...-the-file.html


    Code:
    Sub DirOrder()  '  http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11092&viewfull=1#post11092
    Dim strWB As String
    Rem 1 get the full string, strWB, for a Folder to use in the  Dir(Fullpath&FileName, __ )        ( strWB=Fullpath&FileName - FileName )
    '1a) use the asking pop up thing, File dialogue folder picker
    '   With Application.FileDialog(msoFileDialogFolderPicker)
    '    .Title = "Folder Select"
    '    .AllowMultiSelect = False
    '        If .Show <> -1 Then
    '         Exit Sub
    '        Else
    '        End If
    '    Let strWB = .SelectedItems(1)  '  & "\"
    '   End With
    '
    '1b) Using a test Folder, named  Folder  in the same Folder as the workbook in which this code is
     Let strWB = ThisWorkbook.Path & "\Folder"
    '1c) Hard code instead
    'Let strWB = "F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder"
     Debug.Print "Folder used is" & vbCrLf & strWB & vbCrLf & "" & Right(strWB, (Len(strWB) - InStrRev(strWB, "\", -1, vbTextCompare)))
     Debug.Print
     Let strWB = strWB & "\"
    Rem 2 add last file bit for use in the  Dir(Fullpath&FileName, __ ) , but include wild cards...    http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11089&viewfull=1#post11089 :  _(i) You can use wild cards in the full path and file name string that you give it, so it will look for a file matching your given string. ( So typically you might give a string like “C:\myFolder\*.xl*”, which would look for any excel file: In this bit *.xl* , the first * allows for any file name, and the second * will allow for extensions such as .xls , .xlsm, .xlsx, .. etc… )      _(ii) After you use like Dir(Fullpath&FileName, __ ) once, then any use after of just _ Dir __ without any arguments, will give the next file it finds based on the string you gave in the first use with arguments
    '2a)  Excel files
     Let strWB = strWB & "*.xls*"
    Dim File As String: Let File = Dir(strWB)
     Debug.Print "First got by  Dir(" & strWB & ")" & vbCrLf & "is             " & File
     Debug.Print
        Do '                  '_- I want to keep going in a Loop while I still get a file name returned by  Dir
        Dim Cnt As Long: Let Cnt = Cnt + 1
         Let File = Dir: Debug.Print "Use " & Cnt & " in loop of unargumented   Dir   gives   """ & File & """"
        Loop While File <> "" '_- I want to keep going in a Loop while I still get a file name returned by  Dir
     Debug.Print
     Debug.Print
    End Sub
    Here last routine in form to allow user selection of folder to search for files
    Code:
    Sub DirOrder()  '   http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11093&viewfull=1#post11093
    Dim strWB As String
    Rem 1 get the full string, strWB, for a Folder to use in the  Dir(Fullpath&FileName, __ )        ( strWB=Fullpath&FileName - FileName )
    '1a) use the asking pop up thing, File dialogue folder picker
       With Application.FileDialog(msoFileDialogFolderPicker)
        .Title = "Folder Select"
        .AllowMultiSelect = False
            If .Show <> -1 Then
             Exit Sub
            Else
            End If
        Let strWB = .SelectedItems(1)  '  & "\"
       End With
    
    '1b) Using a test Folder, named  Folder  in the same Folder as the workbook in which this code is
    'Let strWB = ThisWorkbook.Path & "\Folder"
    '1c) Hard code instead
    'Let strWB = "F:\Excel0202015Jan2016\ExcelForum\wbSheetMakerClsdWbADOMsQueery\Kill Stuff\Folder"
     Debug.Print "Folder used is" & vbCrLf & strWB & vbCrLf & "" & Right(strWB, (Len(strWB) - InStrRev(strWB, "\", -1, vbTextCompare)))
     Debug.Print
     Let strWB = strWB & "\"
    Rem 2 add last file bit for use in the  Dir(Fullpath&FileName, __ ) , but include wild cards...    http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11089&viewfull=1#post11089 :  _(i) You can use wild cards in the full path and file name string that you give it, so it will look for a file matching your given string. ( So typically you might give a string like “C:\myFolder\*.xl*”, which would look for any excel file: In this bit *.xl* , the first * allows for any file name, and the second * will allow for extensions such as .xls , .xlsm, .xlsx, .. etc… )      _(ii) After you use like Dir(Fullpath&FileName, __ ) once, then any use after of just _ Dir __ without any arguments, will give the next file it finds based on the string you gave in the first use with arguments
    '2a)  Excel files
     Let strWB = strWB & "*"
    Dim File As String: Let File = Dir(strWB)
     Debug.Print "First got by  Dir(" & strWB & ")" & vbCrLf & "is             " & File
     Debug.Print
        Do '                  '_- I want to keep going in a Loop while I still get a file name returned by  Dir
        Dim Cnt As Long: Let Cnt = Cnt + 1
         Let File = Dir: Debug.Print "Use " & Cnt & " in loop of unargumented   Dir   gives   """ & File & """"
        Loop While File <> "" '_- I want to keep going in a Loop while I still get a file name returned by  Dir
     Debug.Print
     Debug.Print
    End Sub

  6. #156
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Initial coding for solution to this Thread
    http://www.excelfox.com/forum/showth...ll=1#post11124


    File : "Data Sheet.xls" : https://app.box.com/s/wvusyk3ish5z3mxdwvw3sw9n683m58rq

    Code:
    Option Explicit '
    Sub HaiderAdSlots1() ' http://www.excelfox.com/forum/showthread.php/2330-Fill-Column-Based-on-Actual-Time?p=11124&viewfull=1#post11124
    Rem 1 Worksheets info
    Dim Ws1 As Worksheet, Ws2 As Worksheet
     Set Ws1 = ThisWorkbook.Worksheets("Sheet1"): Set Ws2 = ThisWorkbook.Worksheets("Sheet2")
    Dim Lr1 As Long, Lr2 As Long
     Let Lr1 = Ws1.Range("A" & Ws1.Range("A" & Ws1.Rows.Count & "").End(xlUp).Row & "").Row: Let Lr2 = Ws1.Range("A" & Ws2.Range("A" & Ws2.Rows.Count & "").End(xlUp).Row & "").Row
    '1b) data arrays, original data
    Dim arrInSht2() As Variant, arrOutSht1() As Variant
     Let arrInSht2() = Ws2.Range("A1:G" & Lr2 & "").Value2: Let arrOutSht1() = Ws1.Range("A1:C" & Lr1 & "").Value2
    '1b)(ii) extra "column" for outout
    ReDim Preserve arrOutSht1(1 To Lr1, 1 To 4) ' we may add a last dimension, but must keep the others the same as they were
    Rem 2 arrays to identify rows ... " Channel Name &  Date & Time "
    Dim arrInId() As String
     ReDim arrInId(1 To Lr2)
    Dim cnt As Long
        For cnt = 2 To Lr2
         Let arrInId(cnt) = arrInSht2(cnt, 1) & " | " & arrInSht2(cnt, 2) & " | " & arrInSht2(cnt, 3)
        Next cnt
    Dim arrOutId() As String
     ReDim arrOutId(1 To Lr1)
        For cnt = 2 To Lr1
         Let arrOutId(cnt) = arrOutSht1(cnt, 2) & " | " & arrOutSht1(cnt, 1) & " | " & arrOutSht1(cnt, 3)
        Next cnt
    Rem 3 match up rows in data sheets
        For cnt = 2 To Lr1
        Dim MtchRes As Variant
         Let MtchRes = Application.Match(arrOutId(cnt), arrInId(), 1) ' return the position along of a match   ( looking for arrOutId(cnt) ,   in arrInId()   , 1 indicates approximate match )
            If Not IsError(MtchRes) Then
            '3b)
             Let arrOutSht1(cnt, 4) = arrInSht2(MtchRes, 3)
            Else
            End If
        Next cnt
    Rem 4
     Let ThisWorkbook.Worksheets("OutputTest").Range("A1").Resize(UBound(arrOutSht1(), 1), 4).Value = arrOutSht1()
     
    End Sub

  7. #157
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of answer to this Thread
    http://www.excelfox.com/forum/showth...chedule-scores

    _____ Workbook: NFL 2019 Schedule.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    S
    1
    Week # 1
    09.08.19
    2
    V Team GB LAR WAS BUF ATL BAL KC TEN IND CIN SF NYG DET PIT HOU DEN
    TOTAL
    3
    V Score
    0
    4
    H Score
    5
    H Team CHI CAR PHI NYJ MIN MIA JAX CLE LAC SEA TB DAL ARI NE NO OAK
    6
    BYES
    7
    8
    Week # 2
    09.15.19
    9
    V Team TB ARI DAL IND SEA BUF SF LAC MIN JAX NE KC NO CHI PHI CLE
    10
    V Score
    0
    11
    H Score
    12
    H Team CAR BAL WAS TEN PIT NYG CIN DET GB HOU MIA OAK LAR DEN ATL NYJ
    13
    BYES
    14
    Worksheet: 2019


    _____ Workbook: NFL 2019 Schedule.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    S
    1
    Week # 1
    09.08.19
    2
    V Team GB LAR WAS BUF ATL BAL KC TEN IND CIN SF NYG DET PIT HOU DEN
    TOTAL
    3
    V Score
    =SUM(B3:Q4)
    4
    H Score
    5
    H Team CHI CAR PHI NYJ MIN MIA JAX CLE LAC SEA TB DAL ARI NE NO OAK
    6
    BYES
    7
    8
    Week # 2
    09.15.19
    9
    V Team TB ARI DAL IND SEA BUF SF LAC MIN JAX NE KC NO CHI PHI CLE
    10
    V Score
    =SUM(B10:Q11)
    11
    H Score
    12
    H Team CAR BAL WAS TEN PIT NYG CIN DET GB HOU MIA OAK LAR DEN ATL NYJ
    13
    BYES
    14
    Worksheet: 2019
    Attached Files Attached Files

  8. #158
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of this thread
    http://www.excelfox.com/forum/showth...ll=1#post11134

    Sheet2v3.JPG : Attachment 2245

    _____ Workbook: Data Sheet v3.xls ( Using Excel 2007 32 bit )
    Row\Col A B C D E F G
    1 Channel Date AdStart MidBreak Break_Start Break_End Hour
    2 A NEWS 15.11.2017 20:19:12 Mid Break-1 20:19:08 20:24:07 20
    3 A NEWS 15.11.2017 20:19:32 Mid Break-1 20:19:08 20:24:07 20
    4 A NEWS 15.11.2017 20:19:49 Mid Break-1 20:19:08 20:24:07 20
    5 A NEWS 15.11.2017 20:20:01 Mid Break-1 20:19:08 20:24:07 20
    6 A NEWS 15.11.2017 20:20:47 Mid Break-1 20:19:08 20:24:07 20
    7 A NEWS 15.11.2017 20:21:10 Mid Break-1 20:19:08 20:24:07 20
    8 A NEWS 15.11.2017 20:21:20 Mid Break-1 20:19:08 20:24:07 20
    42 A NEWS 15.11.2017 20:58:16 Casual 20:57:14 20:59:57 20
    43 A NEWS 15.11.2017 20:58:33 Casual 20:57:14 20:59:57 20
    44 A NEWS 15.11.2017 20:58:42 Casual 20:57:14 20:59:57 20
    45 A NEWS 15.11.2017 20:59:01 Casual 20:57:14 20:59:57 20
    46 A NEWS 15.11.2017 22:26:58 Mid Break-1 22:26:54 22:33:55 22
    Worksheet: Sheet2v3

    _......... continued in next posts due to post size limitations ( 10,000 characters incl. BB code )
    Attached Images Attached Images

  9. #159
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    _____ Workbook: Data Sheet v3.xls ( Using Excel 2007 32 bit )
    Row\Col A B C D E F G
    45 A NEWS 15.11.2017 20:59:01 Casual 20:57:14 20:59:57 20
    46 A NEWS 15.11.2017 22:26:58 Mid Break-1 22:26:54 22:33:55 22
    47 A NEWS 15.11.2017 22:27:18 Mid Break-1 22:26:54 22:33:55 22
    48 A NEWS 15.11.2017 22:27:36 Mid Break-1 22:26:54 22:33:55 22
    49 A NEWS 15.11.2017 22:28:06 Mid Break-1 22:26:54 22:33:55 22
    78 A NEWS 15.11.2017 22:53:03 Mid Break-2 22:47:02 22:54:02 22
    79 A NEWS 15.11.2017 22:53:18 Mid Break-2 22:47:02 22:54:02 22
    80 A NEWS 15.11.2017 22:53:42 Mid Break-2 22:47:02 22:54:02 22
    81 A NEWS 15.11.2017 22:57:15 Casual 22:57:11 23:00:05 22
    87 A NEWS 15.11.2017 22:58:48 Casual 22:57:11 23:00:05 22
    88 A NEWS 15.11.2017 22:59:08 Casual 22:57:11 23:00:05 22
    89 A NEWS 18.11.2017 23:01:21 Mid Break-1 23:01:17 23:03:21 23
    90 A NEWS 18.11.2017 23:01:37 Mid Break-1 23:01:17 23:03:21 23
    91 A NEWS 18.11.2017 23:01:57 Mid Break-1 23:01:17 23:03:21 23
    140 A NEWS 18.11.2017 23:43:10 Mid Break-3 23:33:53 23:44:55 23
    141 A NEWS 18.11.2017 23:43:40 Mid Break-3 23:33:53 23:44:55 23
    142 A NEWS 18.11.2017 23:44:39 Mid Break-3 23:33:53 23:44:55 23
    143 A NEWS 18.11.2017 23:57:21 Casual 23:57:21 23:59:58 23
    144 A NEWS 18.11.2017 23:57:31 Casual 23:57:21 23:59:58 23
    145 A NEWS 18.11.2017 23:57:39 Casual 23:57:21 23:59:58 23
    146 A NEWS 18.11.2017 23:57:57 Casual 23:57:21 23:59:58 23
    150 A NEWS 18.11.2017 23:58:46 Casual 23:57:21 23:59:58 23
    151 A NEWS 18.11.2017 23:59:06 Casual 23:57:21 23:59:58 23
    152 B NEWS 16.11.2017 20:01:24 Mid Break-2 20:01:24 20:01:50 20
    153 B NEWS 16.11.2017 20:15:08 Mid Break-1 20:15:08 20:20:20 20
    196 B NEWS 16.11.2017 20:42:04 Mid Break-2 20:31:41 20:43:24 20
    197 B NEWS 16.11.2017 20:42:14 Mid Break-2 20:31:41 20:43:24 20
    198 B NEWS 16.11.2017 20:42:29 Mid Break-2 20:31:41 20:43:24 20
    199 B NEWS 16.11.2017 20:42:49 Mid Break-2 20:31:41 20:43:24 20
    200 B NEWS 16.11.2017 20:53:38 Casual 20:53:38 21:00:02 20
    Worksheet: Sheet2v3

  10. #160
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    _____ Workbook: Data Sheet v3.xls ( Using Excel 2007 32 bit )
    Row\Col A B C D E F G H
    199 B NEWS 16.11.2017 20:42:49 Mid Break-2 20:31:41 20:43:24 20
    200 B NEWS 16.11.2017 20:53:38 Casual 20:53:38 21:00:02 20
    201 B NEWS 16.11.2017 20:54:03 Casual 20:53:38 21:00:02 20
    202 B NEWS 16.11.2017 20:54:14 Casual 20:53:38 21:00:02 20
    203 B NEWS 16.11.2017 20:54:29 Casual 20:53:38 21:00:02 20
    217 B NEWS 16.11.2017 20:58:13 Casual 20:53:38 21:00:02 20
    218 B NEWS 16.11.2017 20:58:54 Casual 20:53:38 21:00:02 20
    219 B NEWS 16.11.2017 20:59:29 Casual 20:53:38 21:00:02 20
    220 B NEWS 18.11.2017 21:07:03 Mid Break-2 21:07:03 21:07:29 21
    221 B NEWS 18.11.2017 21:23:41 Mid Break-3 21:23:41 21:28:06 21
    222 B NEWS 18.11.2017 21:24:26 Mid Break-3 21:23:41 21:28:06 21
    256 B NEWS 18.11.2017 21:48:58 Mid Break-7 21:46:22 21:49:35 21
    257 B NEWS 18.11.2017 21:49:10 Mid Break-7 21:46:22 21:49:35 21
    258 B NEWS 18.11.2017 21:49:20 Mid Break-7 21:46:22 21:49:35 21
    259 B NEWS 18.11.2017 21:52:48 Casual 21:52:48 21:59:58 21
    260 B NEWS 18.11.2017 21:53:08 Casual 21:52:48 21:59:58 21
    269 B NEWS 18.11.2017 21:57:10 Casual 21:52:48 21:59:58 21
    270 B NEWS 18.11.2017 21:57:53 Casual 21:52:48 21:59:58 21
    271 B NEWS 18.11.2017 21:59:03 Casual 21:52:48 21:59:58 21
    272 B NEWS 18.11.2017 21:59:25 Casual 21:52:48 21:59:58 21
    273 C NEWS 17.11.2017 22:01:33 Casual 22:01:33 22:03:11 22
    274 C NEWS 17.11.2017 22:02:01 Casual 22:01:33 22:03:11 22
    275 C NEWS 17.11.2017 22:02:16 Casual 22:01:33 22:03:11 22
    276 C NEWS 17.11.2017 22:02:51 Casual 22:01:33 22:03:11 22
    277 C NEWS 17.11.2017 22:18:46 Mid Break-1 22:18:46 22:20:31 22
    292 C NEWS 17.11.2017 22:46:44 Mid Break-2 22:41:24 22:47:44 22
    293 C NEWS 17.11.2017 22:47:25 Mid Break-2 22:41:24 22:47:44 22
    294 C NEWS 17.11.2017 22:58:10 Casual 22:57:26 22:59:55 22
    295
    Worksheet: Sheet2v3

Similar Threads

  1. Replies: 189
    Last Post: 02-06-2025, 02:53 PM
  2. Replies: 293
    Last Post: 09-24-2020, 01:53 AM
  3. Appendix Thread. Diet Protokol Coding Adaptions
    By DocAElstein in forum Test Area
    Replies: 6
    Last Post: 09-05-2019, 10:45 AM
  4. Restrict data within the Cell (Data Validation)
    By dritan0478 in forum Excel Help
    Replies: 1
    Last Post: 07-27-2017, 09:03 PM

Posting Permissions

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