Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have data in a cell eg Rewardsmax_dining_729x90_BUSFIN
I want to strip out the _729x90_BUSFIN. How do I find and replace the contents of this column so that the only text I keep is Rewardsmax_dining each cell in the column has Rewardsmax but each cell has unique text associated with it. I need to strip out anything now Rewardsmax_dining |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way.
Select the cells (or the whole column), then using the Replace feature from the menu bar, type in a single * in the From What: box and Rewardsmax_dining in the Replace With: box and click Replace All. Rob "jules" wrote in message ... I have data in a cell eg Rewardsmax_dining_729x90_BUSFIN I want to strip out the _729x90_BUSFIN. How do I find and replace the contents of this column so that the only text I keep is Rewardsmax_dining each cell in the column has Rewardsmax but each cell has unique text associated with it. I need to strip out anything now Rewardsmax_dining |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi jules:
Select the cells you want to clean and run: Sub reward() Dim s As String s = "Rewardsmax_dining_729x90_BUSFIN" For Each r In Selection If InStr(r.Value, s) < 0 Then r.Value = s End If Next End Sub -- Gary''s Student - gsnu200718 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This version will retain only the first part:
Sub reward() Dim s As String s = "Rewardsmax_dining" For Each r In Selection If InStr(r.Value, s) < 0 Then r.Value = s End If Next End Sub -- Gary''s Student - gsnu200718 "jules" wrote: I have data in a cell eg Rewardsmax_dining_729x90_BUSFIN I want to strip out the _729x90_BUSFIN. How do I find and replace the contents of this column so that the only text I keep is Rewardsmax_dining each cell in the column has Rewardsmax but each cell has unique text associated with it. I need to strip out anything now Rewardsmax_dining |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Replace in Text Box | Excel Discussion (Misc queries) | |||
REPLACE PART OF CELL WITH FORMATTED TEXT | Excel Worksheet Functions | |||
How do I change replace text in a cell for different text? | Excel Worksheet Functions | |||
Find and replace part of a text string | Excel Discussion (Misc queries) | |||
Find part of text in column or array | Excel Discussion (Misc queries) |