*ReplyTo: *excel-mac...@googlegroups.com
*Subject: *$$Excel-Macros$$ Vlookup in Macro
hi group,
In the following vlookup code in macro, if any object is #N/A in the rng
then *run time error 1004*occurs. In such case, i want that it should
show a message as *lookfor data
--
*From: *Raj Mahapatra rajafs...@gmail.com
*Sender: *excel-mac...@googlegroups.com
*Date: *Fri, 10 Dec 2010 10:02:19 +0530
*To: *excel-macros@googlegroups.com
*ReplyTo: *excel-mac...@googlegroups.com
*Subject: *$$Excel-Macros$$ Vlookup in Macro
hi group,
In the following
Sub vlookup()
Dim lookfor As Range
Dim rng As Range
Dim col As Integer
Set lookfor = ActiveCell.Offset(0, -1)
Set rng = ActiveWorkbook.Worksheets(MV).Range(A:C)
col = 3
dept_code = Application.WorksheetFunction.vlookup(lookfor, rng, col,
0)
End Sub
On Fri, Dec 10, 2010 at 10:02
@googlegroups.com
Subject: $$Excel-Macros$$ Vlookup in Macro
hi group,
In the following vlookup code in macro, if any object is #N/A in the rng
then *run time error 1004*occurs. In such case, i want that it should
show a message as *lookfor data is not in the range*
help me how to put msg box if lookfor
hi group,
In the following vlookup code in macro, if any object is #N/A in the rng
then *run time error 1004*occurs. In such case, i want that it should
show a message as *lookfor data is not in the range*
help me how to put msg box if lookfor is not in the rng.
Sub vlookup()
Dim lookfor As