Hi Andy,

 

I think I made 'found' a range, when it wasn't. Sorry.

Try:

If Not IsError(found) Then
  Range("H2:H5").Value = found
  Else: Range("H2:H5").ClearContents
End If


Regards - Dave.

 

 
> Date: Wed, 24 Mar 2010 03:33:09 -0700
> Subject: Re: $$Excel-Macros$$ VBA VLookup dates
> From: andyr...@hotmail.co.uk
> To: excel-macros@googlegroups.com
> 
> Dave,
> 
> Thanks again for the reply. Excel 2002 doesn't recognise IsErr and
> changing it to IsError generates the error "Method 'Range' of
> object'_Worksheet' failed"
> 
> It seems that it won't work because "found" is not a range? Changing
> the line to "If Not IsError(found) Then" or any variation doesn't seem
> to help either.
> 
> 
> On Mar 24, 12:09 am, Dave Bonallack <davebonall...@hotmail.com> wrote:
> > Hi,
> >
> > Something like:
> >
> > If Not IsErr(Range("found")) Then
> > Range("H2:H5").Value = found
> > Else: Range("H2:H5").ClearContents
> > End If
> >
> > Regards - Dave.
> 
> -- 
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our Facebook Group @ 
> http://www.facebook.com/group.php?gid=287779555678
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
> 
> We reach over 6,800 subscribers worldwide and receive many nice notes about 
> the learning and support from the group.Let friends and co-workers know they 
> can subscribe to group at 
> http://groups.google.com/group/excel-macros/subscribe
> 
> To unsubscribe from this group, send email to 
> excel-macros+unsubscribegooglegroups.com or reply to this email with the 
> words "REMOVE ME" as the subject.
                                          
_________________________________________________________________
Get personal with Windows. Download a free gift for your PC.
http://experience.windows.com

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe from this group, send email to 
excel-macros+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to