Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default edit macro to mathc entire cell contents


I'm using the following macro:

Sub rename()
Dim c As Range
Set c = Range("B:B").Find(ActiveCell)
If c Is Nothing Then Exit Sub
ActiveCell = c.Offset(, -1)
End Sub

I need to edit it so that the find is for "match entire cell contents"

Thanks for the help!

-Tamar

--
nis75p0
-----------------------------------------------------------------------
nis75p06's Profile: http://www.excelforum.com/member.php...fo&userid=2694
View this thread: http://www.excelforum.com/showthread.php?threadid=40169

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default edit macro to mathc entire cell contents

Check out the Find method in VB help. In particular look at the "LookAt"
parameter.

--
Jim
"nis75p06" wrote in
message ...

I'm using the following macro:

Sub rename()
Dim c As Range
Set c = Range("B:B").Find(ActiveCell)
If c Is Nothing Then Exit Sub
ActiveCell = c.Offset(, -1)
End Sub

I need to edit it so that the find is for "match entire cell contents"

Thanks for the help!

-Tamara


--
nis75p06
------------------------------------------------------------------------
nis75p06's Profile:
http://www.excelforum.com/member.php...o&userid=26949
View this thread: http://www.excelforum.com/showthread...hreadid=401697



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default edit macro to mathc entire cell contents

Tamara:

The fourth parameter of the Find method indicates whether to look at all or
part of the cell contents. For example:

Set c = Range("B:B").Find(ActiveCell,,,xlWhole)


--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"nis75p06" wrote in
message ...

I'm using the following macro:

Sub rename()
Dim c As Range
Set c = Range("B:B").Find(ActiveCell)
If c Is Nothing Then Exit Sub
ActiveCell = c.Offset(, -1)
End Sub

I need to edit it so that the find is for "match entire cell contents"

Thanks for the help!

-Tamara


--
nis75p06
------------------------------------------------------------------------
nis75p06's Profile:
http://www.excelforum.com/member.php...o&userid=26949
View this thread: http://www.excelforum.com/showthread...hreadid=401697


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
edit the cell contents command in Excel 2007 macro Safia Excel Worksheet Functions 1 March 4th 10 06:48 PM
Edit macro to match entire cell contents nis75p06 Excel Discussion (Misc queries) 1 September 3rd 05 04:27 PM
Printing Entire Contents of Cell waterdawg Excel Discussion (Misc queries) 1 August 31st 05 09:03 PM
How can I edit cell contents with a macro in Excel? Mind the gaps! Excel Discussion (Misc queries) 2 March 23rd 05 08:51 PM
How can I edit cell contents with a macro in Excel? NotAnExpert Excel Discussion (Misc queries) 1 March 23rd 05 01:17 AM


All times are GMT +1. The time now is 07:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"