lookup of Excel to Access

E

Erwin

Will somebody advice me on how to make a similar result in
M/S Access using the function "lookup"( vector form ) of
excel ?
Specially the functionality of lookup of Excel describe below.

=========================================
If LOOKUP can't find the lookup_value, it matches the
largest value in lookup_vector that is less than or equal
to lookup_value.
=========================================

Thanks ....
 
J

Jeff Boyce

Erwin

First, you'll need a table that holds the values you'll be "looking up".

Then, create a query that is sorted in the order you need.

Finally, in your query, you want the largest value that is <= your
criterion. You can parameterize this for user input, or you can use a form
to "collect" the comparison, and your query can use an expression to refer
to the form control's value.
 
J

Jeff Boyce

Erwin

Not to be rude, but I'm reluctant to do the work for you.

There were several steps in what I offered as an approach. Have you tried
any of them?
 
E

Erwin123

Hi Jeff,

I have done some homework, I have two Table. Table1 and Table2.

Table1

Number Output Resistance
1 1.0 1.1
2 5.0 2.5
3 7.0 3.5
4 10.0 4.5
5 11.0 4.6
6 15.0 5.5
7 25.0 8.0
8 50.0 10.0

Table2

ID Power
1 2.5
2 25.0
3 13.0
4 5.0
5 45.0
6 1.5


and I made a querry

SELECT Table2.Power, [Table1]![Resistance] AS Result
FROM Table1, Table2
WHERE ((([Table1]![Resistance])=DMin("Resistance","Table1","Ouput <=
& [Table2]![Power])));

But from the query that I have made, the
answer is only always 1.1 ... Would you please advise as to where i
the problem ?

I want an answer of

Power Resistance
2.5 1.1
25.0 8
13.0 4.6
5.0 2.5
45.0 8
1.5 1.1

Thank you ..
 

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