Posts by Robert B

    Re: Find Last Column With Data


    Hi


    you can do this in VBA


    Code
    Dim SelectColumn as Integer
    SelectColumn = ActiveCell.SpecialCells(xlCellTypeLastCell).Column -3


    I am not sure it can be done with formulae


    Robert

    Re: Return Data From Referencing A Particular Cell And Worksheet


    Hi
    and welcome


    Right click on the first sheet in your workbook and copy this



    This will list all sheets in the workbook and will create a hyperlink to each sheet. It will also create a hyperlink in A1 on each sheet sHowing "Back to Index". You may wish to suppress this.


    In order to achieve the second part of your requirement amend the Range("A1") to your needs


    This code was suggested to me a couple of years ago by a member of this forum to whom all the credit should go


    Hope this helps


    Robert

    Re: Pivot Table Data Limit (version 12 - 2007)


    Hi


    and welcome to the forum.


    I have always found recorded pivot macros unhelpful and suggest the following code, I am using Excel 2000 and so cannot exceed 65560 lines but I can see no reason why it shouldn't work with the later versions.


    I suggest that you step through the code and enter the fileld names as they occur



    Hope that helps


    Robert

    Re: Find Value And Copy Related Values


    Hi
    try replacing this sequence

    Code
    .Cells(Lr, 1) = Sheets("Voorraadscherm").Cells(21, 1) 
                       .Cells(Lr, 3) = Sheets("Voorraadscherm").Cells(21, 3) 
                        .Cells(Lr, 5) = Sheets("Voorraadscherm").Cells(21, 5)


    with this


    Code
    dim SourceCell as Range,TargetCell as Range
    Set TargetCell = Sheets("Voorraadverloop").Range("A" & LR)
    set SourceCell = Sheets("Voorraadscherm").Range("A21")
    SourceCell .Copy Destination:= TargetCell
    SourceCell.Offset(0,2) .Copy Destination:= TargetCell.Offset(0,2)
    SourceCell.Offset(0,4) .Copy Destination:= TargetCell.Offset(0,4)


    I am not certain that the construct .Cells(n,n) is valid. If you are defining a cell within a declared range, the form .Cells(n) is usually OK


    HTH


    Robert

    Re: Find Value And Copy Related Values


    Hi


    I think if you replace


    Code
    Lr = Worksheets("Voorraadverloop").ActiveCell.End(xlDown).Row + 2


    with


    Code
    Lr = ActiveCell.End(xlDown).Row + 2


    that will give you the value you need for Lr, assuming you are running the macro with Voorraadverloop as the active sheet.


    HTH


    Robert

    Re: Find And Delete All Rows Below


    Hi, and welcome to the forum


    try



    Hope that helps


    Robert

    Re: Macro To Open Workbook & Copy Data


    Hi


    this might get you started



    you will probably have to define other variables, when you open your workbook the external links will probably refresh automatically, unless you have that option inhibited.


    Robert

    Re: Sumif Equivalent In Access


    Hi


    I am not certain that there is an equivalent to SUMIF in Access; a workround might be to create a new table for the Fund values and their totals, and then running an update query based on this new table.


    Robert

    Hi


    I have a folder containing a number of worksheets, these worksheets are of 2 types, a customer submitted workbook and, associated with each of these, anything between 2 and 7 locally created workbooks.


    I have a macro which opens a customer workbook and all the relevant local workbooks.


    My problem is that I need to declare a variable for each of the workbooks in the form



    This code is contained within a Found files loop


    Thanks


    Robert

    Re: If, Vlookup & Sum


    Hi


    Welcome to the forum


    enter this formula in the cell on worksheet2 next to the client name


    =SUMIF(worksheet!A1:A12,A1,worksheet1!C1:C12)


    where A1:A12 is the range of clints and C1:C12 is the range containing the various values


    HTH


    Robert

    Re: If, Vlookup & Sum


    Hi


    Welcome to the forum


    enter this formula in the cell on worksheet2 next to the client name


    =SUMIF(worksheet!A1:A12,A1,worksheet1!C1:C12)


    where A1:A12 is the range of clints and C1:C12 is the range containing the various values


    HTH


    Robert


    ps sorry to appear to have duplicated Ger's solution, my phone rang before I could send


    R

    Re: Keyword Within Query


    Hi


    Start with a query using a criterion of IsNot Null in the field containing the email address and base a report on this query


    HTH


    Robert