Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've searched forum...and have not been able to find a solution. I believe
its quite simple...but beyond my capability. I would like to search thru column B for all cell values that equals "modify". If Found, I would like to remove the trailing "i" or "c" in Column C in same row. (i.e. change 51005674i to 51005674) (or change 50004421c to 50004421) I'd like it to search all rows in worksheet. I appreciate any help. Steve |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Steve
Try the below which works on the active sheet Sub Macro() Dim varFound As Variant, strAddress As String With ActiveSheet.Range("B:B") Set varFound = .Find("modify", LookIn:=xlValues, Lookat:=xlWhole) If Not varFound Is Nothing Then strAddress = varFound.Address Do varFound.Offset(, 1) = Val(varFound.Offset(, 1).Text) Set varFound = .FindNext(varFound) Loop While Not varFound Is Nothing And _ varFound.Address < strAddress End If End With End Sub If this post helps click Yes --------------- Jacob Skaria "Steve K" wrote: I've searched forum...and have not been able to find a solution. I believe its quite simple...but beyond my capability. I would like to search thru column B for all cell values that equals "modify". If Found, I would like to remove the trailing "i" or "c" in Column C in same row. (i.e. change 51005674i to 51005674) (or change 50004421c to 50004421) I'd like it to search all rows in worksheet. I appreciate any help. Steve |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jacob - Your the best ! It work perfectly ! Thanks much for your time and
help!!! Steve "Jacob Skaria" wrote: Hi Steve Try the below which works on the active sheet Sub Macro() Dim varFound As Variant, strAddress As String With ActiveSheet.Range("B:B") Set varFound = .Find("modify", LookIn:=xlValues, Lookat:=xlWhole) If Not varFound Is Nothing Then strAddress = varFound.Address Do varFound.Offset(, 1) = Val(varFound.Offset(, 1).Text) Set varFound = .FindNext(varFound) Loop While Not varFound Is Nothing And _ varFound.Address < strAddress End If End With End Sub If this post helps click Yes --------------- Jacob Skaria "Steve K" wrote: I've searched forum...and have not been able to find a solution. I believe its quite simple...but beyond my capability. I would like to search thru column B for all cell values that equals "modify". If Found, I would like to remove the trailing "i" or "c" in Column C in same row. (i.e. change 51005674i to 51005674) (or change 50004421c to 50004421) I'd like it to search all rows in worksheet. I appreciate any help. Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find/Replace Event or Find/Replace for Protected Sheet ... | Excel Programming | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
Using Find and Replace to replace " in a macro | Excel Programming | |||
Replace method - cannot find any data to replace | Excel Programming |