![]() |
|
#1
|
|||
|
|||
![]() I have a worksheet that has data listed examples: 9-2 - Washington and 9-2-30 - Washington. Is there a code that removes the last hyphen between the numbers and beginning of letters that I could drag down my column for a large worksheet? Thanks |
#2
|
||||
|
||||
![]()
What I do is to select all the cells that need editing>Ctrl F>type '-' in the Find What box>click on the Replace With>Replace All
The single quote in the '-' is for clarity only. |
#3
|
||||
|
||||
![]() Quote:
Judging by the posted example, one needs to Find ' - ' and replace with ' '. Or, as per the OP's request, a formula could be used: =SUBSTITUTE(A1, " - "," ")
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
Replace "- " with "". Replace All. (between numbers, hyphens are followed with number immediately, so they aren't replaced)
|
#5
|
|||
|
|||
![]()
Thanks, got it working
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
lily | Excel | 4 | 03-29-2015 07:08 PM |
![]() |
PRA007 | Word VBA | 2 | 12-04-2014 01:53 AM |
![]() |
norwood | Word VBA | 2 | 01-31-2014 01:26 PM |
Display a label character in a data cell | markg2 | Excel | 9 | 09-07-2013 05:56 AM |
Remove first character from text file | dwillyfan | Word VBA | 1 | 09-04-2012 08:29 PM |