Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Mr.Phillips for your answer,I found a sample code that detect the
last item,actualy I first need to find last item and then replace something in column C this code is : Public Sub FindLast() Dim rngFound As Range Dim rngToSearch As Range Set rngToSearch = Range("A2", Cells(Rows.Count, "A").End(xlUp)) Set rngFound = rngToSearch.Find(What:="2C2", _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ SearchDirection:=xlPrevious) If rngFound Is Nothing Then MsgBox "Sorry... Not Found" Else REPLACEMENT End If End Sub what I need now is just replace "test" to "BLK" in column c (in REPLACEMENT) Thanks "Bob Phillips" wrote: Find and Replace (Ctrl-H) will do that, so just do it with the macro recorder switched on. -- __________________________________ HTH Bob "bijan" wrote in message ... Hi All, I have a sheet like this: A B C 1 2B2 1 NRC 2 2B2 2 WW 3 2C2 1 BLK 4 2C2 2 BLK 5 2C2 3 BLK How can I find 2C2 with value 3 in column B (row 5) and change BLK in column C with whatever I want? |
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 | |||
Replace method - cannot find any data to replace | Excel Programming | |||
Find and replace with condition | Excel Discussion (Misc queries) |