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

G

Guest

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.
 
P

Peo Sjoblom

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

--
Regards,

Peo Sjoblom

(No private emails please)
 
G

Guest

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.
 
H

Harlan Grove

yardarm1 said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top