+ Reply to Thread
Results 1 to 4 of 4

how do i get "DGET" to take the first data meeting the criteria?

  1. #1
    Yardarm1
    Guest

    how do i get "DGET" to take the first data meeting the criteria?

    There is more than one record in my array that matches the criteria. I would
    like to use the first accurance.
    At present time I am getting an error message.

  2. #2
    Peo Sjoblom
    Guest

    Re: how do i get "DGET" to take the first data meeting the criteria?

    If you read help that is what you are supposed to get

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Yardarm1" <Yardarm1@discussions.microsoft.com> wrote in message
    news:2044DB69-EFDF-4B98-9118-18C2FFB55C28@microsoft.com...
    > There is more than one record in my array that matches the criteria. I
    > would
    > like to use the first accurance.
    > At present time I am getting an error message.



  3. #3
    yardarm1
    Guest

    Re: how do i get "DGET" to take the first data meeting the criteri

    i know that is what you are suposed to get. What I am looking for is an if
    statement using the error code to jump around the error statement and use the
    first accurance of a match.

    "Peo Sjoblom" wrote:

    > If you read help that is what you are supposed to get
    >
    > --
    > Regards,
    >
    > Peo Sjoblom
    >
    > (No private emails please)
    >
    >
    > "Yardarm1" <Yardarm1@discussions.microsoft.com> wrote in message
    > news:2044DB69-EFDF-4B98-9118-18C2FFB55C28@microsoft.com...
    > > There is more than one record in my array that matches the criteria. I
    > > would
    > > like to use the first accurance.
    > > At present time I am getting an error message.

    >
    >


  4. #4
    Harlan Grove
    Guest

    Re: how do i get "DGET" to take the first data meeting the criteri

    "yardarm1" <yardarm1@discussions.microsoft.com> wrote...
    >i know that is what you are suposed to get. What I am looking for is an if
    >statement using the error code to jump around the error statement and use

    the >first accurance of a match.
    ....

    You can't use DGET for this. DGET will *ALWAYS* return errors when there are
    multiple matches. It *ONLY* works when there's one and only one match.

    You could use INDEX and MATCH in an array formula. You'd need to translate
    your DGET criteria to a formula expression. Something like

    =INDEX(Data,MATCH(1,(INDEX(Data,0,2)=x)*(INDEX(Data,0,5)=y),0),3)



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1