cadeleon Posted August 9, 2011 Posted August 9, 2011 Hi there, Need some help. I need to use vlookup to return a variable. Can someone assist with the Syntax? Here's what I am trying to do. My program should initially look at an entry in the registry for "Code" $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Remote\", "Code") once the variable is read to Memory for $var, I need to use the entry for my vlookup to look for a corresponding entry on an excel spreadsheet related to the "Code" and display the entry on a Messagebox. On the excel spreadsheet, the vlookup parameter should be =vlookup($var,A:B,2,False) ; =vlookup (the Variable "Code",Column A:Column B,index Column 2, "False" to display the exact entry on Column 2 related to "Code" found) any ideas out there? Please advise. Thanks very much !
Bert Posted August 10, 2011 Posted August 10, 2011 look for excel in the helpfile. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Juvigy Posted August 10, 2011 Posted August 10, 2011 In Autoit the function would look like: $Filename = "workboob.xls" $RegValue = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Remote\", "Code") $oExcel = excel object $test = $oExcel.Application.Evaluate("VLOOKUP($RegValue&",'["&$Filename&"]Sheet'!$A:$B",1,FALSE)")
cadeleon Posted August 11, 2011 Author Posted August 11, 2011 look for excel in the helpfile.Thanks for your assistance but I cant find anything related to vlookup when I put Excel on the Helpfile.
JoHanatCent Posted August 11, 2011 Posted August 11, 2011 Thanks for your assistance but I cant find anything related to vlookup when I put Excel on the Helpfile. Does this help? $sAutoItPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") Run(@WindowsDir & "\HH.exe " & $sAutoItPath & "\UDFs3.chm::/html/libfunctions/_ExcelWriteFormula.htm", "", @SW_MAXIMIZE)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now