Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
Im looking for VB that will look in column U for any instance of "abc" and when it finds it replace the entire cell contents with nothing. Thus for eg in cell u2 I have a value abc(if,d2-3,z,y) after the macro runs I need to have the cell be blank. (ie delete the abc and everything after it..) abc is always the first three letters in the cell. Any ideas..? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public Sub ProcessData()
Const TEST_COLUMN As String = "U" '<=== change to suit Dim i As Long Dim iLastRow As Long With ActiveSheet iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row For i = iLastRow To 1 Step -1 If .Cells(i, TEST_COLUMN).Value Like "abc*" Then .Cells(i, TEST_COLUMN).Value = "" End If Next i End With End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Darin Kramer" wrote in message ... Hi there, Im looking for VB that will look in column U for any instance of "abc" and when it finds it replace the entire cell contents with nothing. Thus for eg in cell u2 I have a value abc(if,d2-3,z,y) after the macro runs I need to have the cell be blank. (ie delete the abc and everything after it..) abc is always the first three letters in the cell. Any ideas..? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Bob, thank you so so much! Works like a charm! *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find partial match from column A,B and fill partial match in C? | Excel Discussion (Misc queries) | |||
Find/Replace - Full Navigation of Spreadsheet | Excel Discussion (Misc queries) | |||
Replace a long list of abbreviations with full words in Excel | Excel Worksheet Functions | |||
Partial search and replace? | Excel Discussion (Misc queries) | |||
Partial replace | New Users to Excel |