My requirement is as below: There is a table S_LST_OF_VAL which has two columns NAME and VALUE.

Now i have data in the excel sheet ( test.xls) where there are 3 columns A, B, C In column 'A' of the excel sheet we have the data which is same as that of the NAME column of S_LST_OF_VAL table, what i need to do is for the values in column A, I need to look up in the S_LST_OF_VAL table and get the corresponding VALUE from the table into the excel sheet.

Hope that makes it clear in regard with what i want to achieve.

Yes, that is clear! What you want is easy to achieve through the use of the SQLQueryValue function.

Suppose your spreadsheet looks like this:

A1: one A2: two A3: three A4: four

And suppose your table translates them into a numerical. If you want the result to be displayed in column B then type in B1 the following formula: B1: =SQLQueryValue("select value from S_LST_OF_VAL where name = '" & A1 & "'" )

Note there is a little work with the single quotes in the formula. Basically I am wrapping the value in A1 in single quotes.

If you enter the formula in B1 you should see the value 1 displayed immediately. Now copy B1 and paste it to B2 to B4. You will see that the formula automatically adjusts.

Copyright (C) 1995-2007 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.
sitemap