Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how to use a VLOOKUP function in a VBA code?
Hi
am a novice in excel...i have a excel sheet with 2 columns with around 10000 records.i have placed a button in the excel sheet and on clicking the button it should find all the values in the first column which doesnt have a match in the second column.for that i can use VLOOKUP function.but i dont know how to use that one. Can any one help me? Thanks in advance.... With Regds Sunil.T |
#2
|
|||
|
|||
WorksheetFunctions.Vlookup() The arguments are similar Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=378023 |
#3
|
|||
|
|||
Hi,
i tried ..but am getting some errors...it will be very helpful for me if u send me the syntax regarding my req.Thanks in advance With regds Sunil.T "Sunil" wrote: Hi am a novice in excel...i have a excel sheet with 2 columns with around 10000 records.i have placed a button in the excel sheet and on clicking the button it should find all the values in the first column which doesnt have a match in the second column.for that i can use VLOOKUP function.but i dont know how to use that one. Can any one help me? Thanks in advance.... With Regds Sunil.T |
#4
|
|||
|
|||
Hi Sunil, Here's an example: Private Sub CommandButton1_Click() Set myRng = Worksheets("Sheet1").Range("A1:B10") myLookup = 4 myValue = WorksheetFunction.VLookup(myLookup, myRng, 2) End Sub The table is A1:B10. myLookup is the lookup_value which would be in column A. myValue is the value corresponding to the myLookup as returned by the above formula. 2 is the column index number which tells the lookup to look for the result in the second column of the table A1:B10 i.e. column B Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=378023 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically up date time in a cell | Excel Discussion (Misc queries) | |||
VLOOKUP Function | Excel Worksheet Functions | |||
How to use a cell value as Table Array in VLOOKUP worksheet function | Excel Discussion (Misc queries) | |||
VLOOKUP function | Excel Worksheet Functions | |||
vlookup function in excel referencing an access table | Excel Worksheet Functions |