Posts by Macropheliac

    Re: Viewing Attachments In Current Threads


    Hello tpampel!


    You say the results should be in a "totally different workbook". Would this workbook be a new workbook or an existing workbook? Where (Sheet name) in the workbook would the results be placed? Would the headings be the same as the headings in the current workbook?


    With a little information, this should be a fairly simple task.



    Mac

    Re: Viewing Attachments In Current Threads


    Hello again, tpampel!


    I have plenty of time, now. Instead of rehashing a years old thread, why don't you explain your data layout and what you would like to accomplish. Perhaps you can even attach an example. I'm sure we can work this out.



    Mac

    Re: Viewing Attachments In Current Threads


    In the following code:

    Code
    Sub FindPaste()
    Dim iCell As Range
    
    
    For Each iCell In ActiveSheet.Range("A:A")
            If iCell.Value = "California" Then
                    iCell.EntireRow.Copy Sheets("PasteSheet").Range("A65536").End(xlUp).Offset(1)
            End If
    Next iCell
    End Sub


    iCell is a variable that represents a Range. This is used in a For Each loop to test each cell in the column. When the value "California" is found, the entire row is copied and pasted to the first available row on the "PasteSheet".


    I will have time later, from home, to explain more. For now, do a search for variables, ranges, loops, and copy method. I'm sorry I do not have time, now.


    I hope this helps,


    Mac

    Re: Copy Content Of The Cell Before Date


    On which line do you receive the error?


    Did you try changing:

    Code
    lngCmp = InputBox("Please enter the date", "Begining of the week")


    to:

    Code
    lngCmp = DateValue(InputBox("Please enter the date", "Begining of the week") )


    Mac

    Re: Copy Content Of The Cell Before Date


    This worked in my test:


    Code
    If DateValue(InputBox("Please enter the date", "Begining of the week")) < DateValue(Cells(i, 29).Value) Then
        Sheets("Result").Cells(6 + lngResultspast, 23) = Sheets("Tracker2").Cells(i, 5)
        Sheets("Result").Cells(6 + lngResultspast, 24) = Sheets("Tracker2").Cells(i, 8)
        Sheets("Result").Cells(6 + lngResultspast, 25) = Sheets("Tracker2").Cells(i, 10)
    End If


    Mac

    Re: Paste Column But Change Order


    Hello, charlesa920!


    If I understand correctly, the following will do it.


    Code
    Sub TransferData()
    Sheets("MANUAL ADJUSTMENTS").Range("A1:G" & Sheets("MANUAL ADJUSTMENTS").Range("G65536").End(xlUp).Row).Copy Sheets("TRANSACTIONS").Range("A1")
    Sheets("MANUAL ADJUSTMENTS").Range("J1:K" & Sheets("MANUAL ADJUSTMENTS").Range("K65536").End(xlUp).Row).Copy Sheets("TRANSACTIONS").Range("J1")
    End Sub


    Mac

    Re: Remove .xls From Header


    Hello Foxxy1!


    I'm not sure what you mean but this will give you the name of the current workbook without the .xls. Maybe you can adapt it.


    Code
    Sub LoseThexls()
    Dim i As Long
    
    
    i = Len(ThisWorkbook.Name)
    MsgBox Left(ThisWorkbook.Name, i - 4)
    End Sub


    Mac

    Re: Taking Focus From Input Box Or Close On Workbook Deactivate


    Hello bancey!


    I'm guessing here, and you may correct me if I'm wrong, but I assume there is code in the Workbook_Open event of the second workbook. If this is the case, then the execution of code is already in process and the event code will not execute until the completion of the original code.


    Perhaps if you could explain what it is you're attempting, we can come up with a work around.


    Mac

    Re: Matching Value


    Maybe something like this:



    The above assumes the two worksheet names are Sheet 1 and Sheet 2 and the columns in question are in Column A. The results are placed in column B of Sheet 1.


    I hope it helps.
    Mac