1. The following untested batch script does the job assuming 1) the duplicate rows to be deleted are in sequence; 2) the key field for deletion starts as ,IN @echo off & setlocal EnableDelayedExpansion pushd Your_Folder for %%i in (*.csv) do ( set row= for /F "delims=" %%j in ('type "%%i" ^| find /Read more

    The following untested batch script does the job assuming
    1) the duplicate rows to be deleted are in sequence;
    2) the key field for deletion starts as ,IN

    @echo off & setlocal EnableDelayedExpansion
    pushd Your_Folder
    for %%i in (*.csv) do (
    set row=
    for /F “delims=” %%j in (‘type “%%i” ^| find /V “,IN”‘) do (
    if not “%%j”==”!row!” echo.%%j>> “%%~ni.tmp”
    set row=%%j
    )
    )
    del *.csv
    ren *.tmp *.csv
    popd

    See less
    • 0
  2. ::====== script starts here =============== :: insert [Toolbar] block :: julio.bat 2016-04-21 11:16:14.73 @echo off > NEWFILE & setLocal enableDELAYedeXpansioN :main for /f "tokens=1* delims=]" %%a in ('find /v /n "" ^< myfile') do ( if %%b equ [Layouts] ( echo. echo.[Toolbar] echo.OrthoCaRead more

    ::======  script starts here  ===============
    :: insert [Toolbar] block
    :: julio.bat  2016-04-21 11:16:14.73
    @echo off > NEWFILE & setLocal enableDELAYedeXpansioN
    
    :main
    for /f "tokens=1* delims=]" %%a in ('find /v /n "" ^< myfile') do (
      if %%b equ [Layouts] (
        echo.
        echo.[Toolbar]
        echo.OrthoCad=Models,Start OrthoCAD with this patient's info,c:\dolphin\buttons\orthocad.bmp,C:\Program Files ^(x86^)\Cadent\OrthoCad\OrthoCad.exe -patient_id={PatientID}
        echo.
      )
    echo.%%b
    ) >> newfile
    ::======  script ends here  =================
    
    See less
    • 0
  3. @echo off & setlocal enabledelayedexpansion set arch=c:\duplicate cd /d %arch% set rev=%date:~-4%%date:~4,2%%date:~7,2%.bat set dest=D:\gemscol\key\voucher\normal :: this builds the "reverse-engine" batch based on date of the archive-run cd /d %dest%>%rev% for /f "tokens=*" %%a in ('dir /s /bRead more

    @echo off & setlocal enabledelayedexpansion
    set arch=c:\duplicate
    cd /d %arch%
    set rev=%date:~-4%%date:~4,2%%date:~7,2%.bat
    set dest=D:\gemscol\key\voucher\normal
    :: this builds the “reverse-engine” batch based on date of the archive-run
    cd /d %dest%>%rev%
    for /f “tokens=*” %%a in (‘dir /s /b *.txt’) do (
    :: build the reverse-engine batch
    >> %rev% echo copy /y %arch%\%%~nxa %%a
    :: now copy/move
    copy /y %%a %arch%
    )
    ::===== end
    not tested. reverse-action (“restore”) batch files stored as yyyymmdd.bat which are also stored in the archive directory (“duplicate”).

    See less
    • 0
  4. This only works if your date format is like "Sat 03/10/" (year doesn't matter). If not, you might want to use vbscript for date-handling. Batch is fickle about dates. ::===== begin batchscript "weakday" @echo off & setlocal rem for testing purposes: set /p dd=date: set dd=%date% set z=%dd:~0,1%Read more

    This only works if your date format is like “Sat 03/10/” (year doesn’t matter). If not, you might want to use vbscript for date-handling. Batch is fickle about dates.
    ::===== begin batchscript “weakday”
    @echo off & setlocal
    rem for testing purposes: set /p dd=date:
    set dd=%date%
    set z=%dd:~0,1%
    set proc=xx.bat
    set aa=01
    if /i %z% equ s set aa=00
    if /i %z% equ m set aa=03
    if “%dd:~7,2%” leq “%aa%” set proc=zz.bat
    echo calling %proc%
    call %proc%
    ::===== end batch

    See less
    • 0
  5. Try this code.I added a section to make sure that you don't select any blank cells. Since there are a gazillion blank cells in every workbook, the code will find them and run forever.I also commented out the instructions that populate A1 and B1. Those instructions are expecting a single search strinRead more

    Try this code.

    I added a section to make sure that you don’t select any blank cells. Since there are a gazillion blank cells in every workbook, the code will find them and run forever.

    I also commented out the instructions that populate A1 and B1. Those instructions are expecting a single search string, which we no longer have.

    Sub SearchWKBooks()
    Dim WS As Worksheet
    Dim myfolder As String
    Dim a As Single
    Dim sht As Worksheet
    Dim serRng As Range
    
    
    
    Set WS = Sheets.Add
    
    With Application.FileDialog(msoFileDialogFolderPicker)
        .Show
        myfolder = .SelectedItems(1) & ""
    End With
    
    'Get Search String Range From User
     On Error Resume Next
       Set serRng = Application.InputBox _
           (prompt:="Select or Enter Range With Search Strings" & vbCrLf & vbCrLf & _
                    "Click OK When Done" & vbCrLf & vbCrLf & _
                    "Click Cancel To Exit", _
                    Title:="Search all workbooks in a folder", Type:=8)
    
     On Error GoTo 0
     
    'Exit Sub If Cancel Clicked
     If serRng Is Nothing Then Exit Sub
     
    'Do not allow blank cells in Search Range
     If WorksheetFunction.CountA(serRng) <> serRng.Cells.Count Then
      MsgBox "There Are Blank Cells In Your Range." & vbCrLf & vbCrLf & _
             "Blank Search Strings Are Not Allowed." & vbCrLf & vbCrLf & _
             "Please Try Again."
      Exit Sub
     End If
    
    'Setup Worksheet Titles
    
    'WS.Range("A1") = "Search string:" ***I'm not sure what you want here any more
    'WS.Range("B1") = Str ***I'm not sure what you want here any more
    WS.Range("A2") = "Path:"
    WS.Range("B2") = myfolder
    WS.Range("A3") = "Workbook"
    WS.Range("B3") = "Worksheet"
    WS.Range("C3") = "Cell Address"
    WS.Range("D3") = "String"
    WS.Range("E3") = "Link"
    
    'Search All Sheets In All Workbooks
    '(More comments should be added to explain steps)
    
    a = 0
    
    Value = Dir(myfolder)
     Do Until Value = ""
        If Value = "." Or Value = ".." Then
        Else
            If Right(Value, 3) = "xls" Or _
               Right(Value, 4) = "xlsx" Or _
               Right(Value, 4) = "xlsm" Then
                On Error Resume Next
                Workbooks.Open Filename:=myfolder & Value, Password:="zzzzzzzzzzzz"
                If Err.Number > 0 Then
                    WS.Range("A4").Offset(a, 0).Value = Value
                    WS.Range("B4").Offset(a, 0).Value = "Password protected"
                    a = a + 1
                Else
                    On Error GoTo 0
     
    'Search For Each String In Range
                 For Each cell In serRng
                   For Each sht In ActiveWorkbook.Worksheets
                            Set c = sht.Cells.Find(cell, LookIn:=xlValues, _
                                                         LookAt:=xlPart, _
                                                         SearchOrder:=xlByRows, _
                                                         SearchDirection:=xlNext)
                            If Not c Is Nothing Then
                                firstAddress = c.Address
                                Do
                                  WS.Range("A4").Offset(a, 0).Value = Value
                                  WS.Range("B4").Offset(a, 0).Value = sht.Name
                                  WS.Range("C4").Offset(a, 0).Value = c.Address
                                  WS.Range("D4").Offset(a, 0).Value = c.Value
                                  WS.Hyperlinks.Add Anchor:=WS.Range("E4").Offset(a, 0), _
                                                    Address:=myfolder & Value, _
                                                    SubAddress:=sht.Name & "!" & _
                                                    c.Address, TextToDisplay:="Link"
                                    a = a + 1
                                    Set c = sht.Cells.FindNext(c)
                                Loop While Not c Is Nothing And c.Address <> firstAddress
                            End If
                    Next sht
                 Next
               End If
    
                 Workbooks(Value).Close False
                On Error GoTo 0
            End If
        End If
        Value = Dir
     Loop
    
    Cells.EntireColumn.AutoFit
    End Sub
    
    

    Click Here Before Posting Data or VBA Code —> How To Post Data or Code.

    See less
    • 0
  6. First run a Diagnostic: Running Microsoft Office Diagnostics from within Excel/Word Click the Microsoft Office button Click on the Excel/Word Options button to bring up the Excel Options dialog box (at the bottom of window) Click on the Resources button in the left hand pane Click on the Diagnose buRead more

    First run a Diagnostic:
    Running Microsoft Office Diagnostics from within Excel/Word

    Click the Microsoft Office button
    Click on the Excel/Word Options button to bring up the Excel Options dialog box (at the bottom of window)
    Click on the Resources button in the left hand pane
    Click on the Diagnose button in the right hand pane
    Click Continue
    Click Run Diagnostics

    Running Microsoft Office Diagnostics from the Start Menu

    Click on the Start button
    Click All Programs
    Click Microsoft Office folder
    Click Microsoft Office Tools
    Click Microsoft Office Diagnostics
    Click Continue
    Click Run Diagnostics

    If that does not help then you may have a corruption within one of your paragraph markers or in the final paragraph marker of the document.

    To display your paragraph markers:
    On the toolbar/ribbon on the Home tab,
    look for a backwards P symbol and click on it.
    This will show the paragraph markers at the end of each paragraph
    Highlight the paragraph marker at the end of whatever paragraph you are
    have problems with and delete it.
    This will remove any special paragraph formatting that was applied to that paragraph and hopefully remove the corruption with it.

    See less
    • 0
  7. I still do not see the relationship between C5 and C12.What is the logic behind the color of C5?Why is C5 colored dark blue? Does C5 need to be a specific type of TEXT string?Is there something within the TEXT string that denotes it should be Blue? Apparently all your doing in C12 is cutting out theRead more

    I still do not see the relationship between C5 and C12.

    What is the logic behind the color of C5?
    Why is C5 colored dark blue?

    Does C5 need to be a specific type of TEXT string?
    Is there something within the TEXT string that denotes it should be Blue?

    Apparently all your doing in C12 is cutting out the 18 and subtracting 3 to make it 15.

    The only thing I can see is that you need a two digit number in C5 to get any response, else you get a blank cell.

    MIKE

    http://www.skeptic.com/

    See less
    • 0
  8. Hi, Here is a solution. The formula uses the row that the formula is on to create an offset. Enter this formula in a cell in Row 6 =OFFSET('2009 Data'!$M$10,0,ROW()-6) If you wish to start in another row, replace 6 with the row number that the formula is in. This means that the first formula you entRead more

    Hi,
    Here is a solution. The formula uses the row that the formula is on to create an offset.
    Enter this formula in a cell in Row 6

    =OFFSET(‘2009 Data’!$M$10,0,ROW()-6)

    If you wish to start in another row, replace 6 with the row number that the formula is in.
    This means that the first formula you enter returns the value in cell M10 on sheet ‘2009 Data’. The Offset is zero for both row and column.
    Note the $ in the formula
    Drag the formula down as many rows as required.
    The formula looks identical in all rows, but the column offset value is increasing with the increasing row number.
    Regards

    See less
    • 0
  9. In the host network adapter TCP properties, did you add/activate the virtualbox network adapter? When bridged, the clients will get IP address form the router/modem DHCP IP pool. When set to NAT, the host will act as a DHCP server and router. This means there need to be services running to make thisRead more

    In the host network adapter TCP properties, did you add/activate the virtualbox network adapter?
    When bridged, the clients will get IP address form the router/modem DHCP IP pool.
    When set to NAT, the host will act as a DHCP server and router. This means there need to be services running to make this work.

    See less
    • 0
  10. Very valid point by Wanderer. I would however support CurtR's advice re' ensuring the router is protected with a suitable encrypted key (a new one); and also to change the SSID to something less obvious. And even better to actually hide the SSID - not to broadcast it (after carefully noting what itRead more

    Very valid point by Wanderer. I would however support CurtR’s advice re’ ensuring the router is protected with a suitable encrypted key (a new one); and also to change the SSID to something less obvious. And even better to actually hide the SSID – not to broadcast it (after carefully noting what it is and ensuring there is a hard copy, or record of it somewhere safe – and known to the poster only).
    Equally with a little help from us pholks here possibly the lady can be encouraged to employ mac filtering too; as that is another (albeit basic) level of security; and the more the better?

    See less
    • 0