Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Matching Characters in Excel 1

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
0
0
Hi, I'm trying to evaluate the first 5 characters in the activecell and the one right below, but lamentably the debugger doesn't like the <<Cells(2, 1).>> part of the statement.

If Left$(Text$, 5) = Cells(2, 1).Left$(Text$, 5) Then...

Thanks for your help


RO

 


hi,
Code:
If Left$(Text$, 5) = Left$(Cells(2, 1).Value, 5) Then...
this compare the value in Text$ with the value in Cells(2,1).


Skip,
[sub]
[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue][/sub]
 
the first 5 characters in the activecell and the one right below
If Left(ActiveCell.Text, 5) = Left(ActiveCell.Offset(1, 1).Text, 5) Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top