Re: $$Excel-Macros$$ Vlookup in Macro

2010-12-13 Thread Ravi Kumar Vandavasi
U can use on error goto msg msg: Inputbox() On Dec 13, 9:52 am, Raj Mahapatra wrote: > hi Vaibhav, > > thanks for this. > > but i want to dispaly an input box as "*lookfor is not in the rng*" while > there is error. > > > > On Fri, Dec 10, 2010 at 1:32 PM, wrote: > > Hi, > > > Add line; > > > O

Re: $$Excel-Macros$$ Vlookup in Macro

2010-12-12 Thread Raj Mahapatra
hi Vaibhav, thanks for this. but i want to dispaly an input box as "*lookfor is not in the rng*" while there is error. On Fri, Dec 10, 2010 at 1:32 PM, wrote: > Hi, > > Add line; > > On error resume next > > Rgds > Vaibhav J > > Sent on my BlackBerry® from Vodafone > --

Re: $$Excel-Macros$$ Vlookup in Macro

2010-12-11 Thread Vishal Angre
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

Re: $$Excel-Macros$$ Vlookup in Macro

2010-12-10 Thread in . vaibhav
Hi, Add line; On error resume next Rgds Vaibhav J Sent on my BlackBerry® from Vodafone -Original Message- From: Raj Mahapatra Sender: excel-macros@googlegroups.com Date: Fri, 10 Dec 2010 10:02:19 To: Reply-To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Vlookup in Macro