Automate

 View Only
  • 1.  Query selection criteria

    Posted 07-13-2023 09:04

    Is there a way to use the = and the between operator in a query and have it look in a different sheet?  The information says to enter the cell but does not tell me the format for entering a cell on a different sheet.

    I have one sheet I want to return the data to and then I have another sheet for selecting the data.  When I use the in operator I can choose a cell from another sheet, I've tried that same format for the = and between operators and it says it is an invalid cell.



    ------------------------------
    Anita Mefford
    ConocoPhillips
    Houston OK
    ------------------------------

    Attachment(s)

    Qsq
    BKPF - BSEG.Qsq   492 KB 1 version
    xlsx
    BKPF - BSEG.xlsx   5 KB 1 version


  • 2.  RE: Query selection criteria

    Employee
    Posted 07-13-2023 18:33

    Hi Anita

    It looks like you did it for Company already

    You would just use the same for the rest. 

    Instead of = use IN and then limit it to 1 row  - like this

    It will look something like this:

    note there was no value in that column, but it would use it if filled in.

    You can do the same for fiscal year and fiscal period.

    Instead of between for the posting date, I would use Posting Date I'm not sure.  There are relative values, like start of month and end of month, today to today - 7, and the like.  Would any of those work instead?

    HTH a little,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: Query selection criteria

    Posted 07-17-2023 09:17

    I have 3 fields that are required but the rest of them do not need to be entered.  When I change the non required fields to use the IN operator, I get a message, "The file for selecting values is empty."



    ------------------------------
    Anita Mefford
    ConocoPhillips
    Houston OK
    ------------------------------



  • 4.  RE: Query selection criteria

    Posted 07-17-2023 10:58

    I should add that using the In operator with a dynamic list is when I get the error.   Using the IN operator with a static list runs without errors.  So static list I can leave it empty, with a dynamic list I'm required to enter data.  I do not want to be required to enter data and I don't want to use the static list because that defeats the purpose of using a sheet to enter the criteria.



    ------------------------------
    Anita Mefford
    ConocoPhillips
    Houston OK
    ------------------------------