Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
edit the cell contents command in Excel 2007 macro | Excel Worksheet Functions | |||
Edit macro to match entire cell contents | Excel Discussion (Misc queries) | |||
Printing Entire Contents of Cell | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) |