Posts by turtle44

    Re: Find Cell Value In Another Workbook & Copy


    Quote from Sweater Fish Delux

    I guess this just points to some fundamental misunderstanding of VBA on my part since I can't figure out any reason why the second code doesn't work as desired.


    I think it should work either way.

    Quote from Sweater Fish Delux

    Also, you mentioned the possibility of an empty cell in column C where I'm trying to retrieve data. How could I catch those occurances as well? rFound doesn't remain set to Nothing in those cases? What is it set to?


    It is set to the empty cell in Column C. What do you want to happen if "Application ID" is found in column B but column C is blank?

    Re: Finding The First Empty Row In A Macro


    This will find the last row with any data. (Add 1 to get next empty row) There is no error handling, so this will fail if entire sheet is blank.

    Code
    lLastRow = Cells.Find(What:="*", After:=Cells(1, 1), LookIn:=xlFormulas, Lookat:=xlPart, _
             SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row

    Re: Finding The First Empty Row In A Macro


    Quote from chatguy

    Would anyone know how to search for the "First Empty Row" in a VB Macro?


    The easiest way would be to look at the "Possible Answers" above. I'm sure they answer the same question. A simple search would work also.

    Re: Too Many Arguments


    If you table data is in D1:E14, then enter this formula in B1 and copy down.
    [bfn]=VLOOKUP(A1,$D$1:$E$14,2,FALSE)[/bfn]
    Or, if you don't want the error values, something like this:
    [bfn]=IF(COUNTIF($D$1:$D$14,A1)=0,"",VLOOKUP(A1,$D$1:$E$14,2,FALSE))[/bfn]

    Re: Combine Macro And Autofill Row


    Not sure what you're asking, but see if this helps:

    Code
    Dim lLastRow As Long
    lLastRow = 101 'how do you determine last row???
    Range(Cells(2, "B"), Cells(lLastRow, "B")).FormulaR1C1 = "=MID(RC[1],34,20)"
    Columns("B:B").EntireColumn.AutoFit
    Range(Cells(2, "A"), Cells(lLastRow, "D")).Sort Key1:=Range("B2"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal


    Also, are you really using Excel 2007, because I didn't think FileSearch was compatible with that version?

    Re: Find A Value In A Column, And Replace The Value In The Adjacent Column, Same Row


    Each time you search, you are starting at the beginning. So even though you are looping for each instance, you are only finding the first instance each time. Give me a few minutes and I'll give you a fix.[hr]*[/hr] Auto Merged Post;[dl]*[/dl]Here you go: