Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access and Excel

Status
Not open for further replies.

Bizylizard

Technical User
Apr 25, 2007
3
US
Excel has an Index function explained below is there a way to do the same function in Access?

Returns a value or the reference to a value from within a table or range. There are two forms of the INDEX() function: array and reference. The array form always returns a value or an array of values; the reference form always returns a reference.

INDEX(array,row_num,column_num) returns the value of a specified cell or array of cells within array.

INDEX(reference,row_num,column_num,area_num) returns a reference to specified cells within reference.

 
JetSQL has no array nor cell, so what do you want to do ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I have a table with the below info. I want to be able to query of off this table when M+P=Result but the problem is when I have another table and I have a M value of 109.92 and a P value of 190.87 I need as the result to be M is 110.00 + P 191.00 = Result of 219.00.

Does that makes sense?


M % P % Result
110.00% 200.00% 222.00%
110.00% 199.00% 221.00%
110.00% 198.00% 221.00%
110.00% 197.00% 221.00%
110.00% 196.00% 221.00%
110.00% 195.00% 221.00%
110.00% 194.00% 219.00%
110.00% 193.00% 219.00%
110.00% 192.00% 219.00%
110.00% 191.00% 219.00%
110.00% 190.00% 219.00%
110.00% 189.00% 217.00%
110.00% 188.00% 217.00%
 
A starting point (SQL code):
SELECT Result
FROM yourTable
WHERE M=(SELECT Min(M) FROM yourTable WHERE M>=109.92)
AND P=(SELECT Min(P) FROM yourTable WHERE P>=190.87)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top