Re: $$Excel-Macros$$ Match text to a list

2012-03-10 Thread dguillett1
roups.com Subject: $$Excel-Macros$$ Match text to a list I am using Excel 2007 In cell D18 I have some text. I need the VBA to check if this text appears in the list in Cells L6:L27 If it does it then exits the sub otherwise it must do something else. Can anyone help with this code. -- FORUM R

Re: $$Excel-Macros$$ Match text to a list

2012-03-10 Thread Dilip Pandey
Hi Brian, You can include the following code in your macro:- Sub chk() Source = Range("d18") target = Range("L6:l27") i = Application.WorksheetFunction.Match(Source, target) If i >= 0 Then 'continued.. paste your code here End If End Sub Regards, DILIPandey On Sat, Mar 10, 2012 at 2:36 PM,

$$Excel-Macros$$ Match text to a list

2012-03-10 Thread Brian
I am using Excel 2007 In cell D18 I have some text. I need the VBA to check if this text appears in the list in Cells L6:L27 If it does it then exits the sub otherwise it must do something else. Can anyone help with this code. -- FORUM RULES (986+ members already BANNED for violation) 1) Use con