Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This punctuation mark ' appears before every word in every row of column A.
Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
could you try
=MID(A1,2,LEN(A1) ) as the first chracter may not be a ' even though it appears to be. "Sal" wrote: This punctuation mark ' appears before every word in every row of column A. Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
no to my previious.
' was a LOTUS alignment control, and this meant left align use =MID(A1,1,LEN(A1) ) "Sal" wrote: This punctuation mark ' appears before every word in every row of column A. Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to remove them in place, select the cells and run:
Sub tickout() Dim r As Range For Each r In Selection If r.PrefixCharacter = "'" Then r.Value = r.Value End If Next End Sub -- Gary''s Student - gsnu200902 "Sal" wrote: This punctuation mark ' appears before every word in every row of column A. Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a non-looping method that I believe also works...
As a one-liner ========================================= Selection.SpecialCells(xlTextValues Or xlCellTypeConstants).Value = _ Selection.SpecialCells(xlTextValues Or xlCellTypeConstants).Value Same code "prettied up" for readability ========================================= With Selection.SpecialCells(xlTextValues Or xlCellTypeConstants) .Value = .Value End With -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... If you want to remove them in place, select the cells and run: Sub tickout() Dim r As Range For Each r In Selection If r.PrefixCharacter = "'" Then r.Value = r.Value End If Next End Sub -- Gary''s Student - gsnu200902 "Sal" wrote: This punctuation mark ' appears before every word in every row of column A. Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I used the wrong syntax. I believe my code should have been written
this way... As a one-liner ========================================= Selection.SpecialCells(xlCellTypeConstants, xlTextValues).Value = _ Selection.SpecialCells(xlTextValues Or xlCellTypeConstants).Value Same code "prettied up" for readability ========================================= With Selection.SpecialCells(xlCellTypeConstants, xlTextValues) .Value = .Value End With -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... Here is a non-looping method that I believe also works... As a one-liner ========================================= Selection.SpecialCells(xlTextValues Or xlCellTypeConstants).Value = _ Selection.SpecialCells(xlTextValues Or xlCellTypeConstants).Value Same code "prettied up" for readability ========================================= With Selection.SpecialCells(xlTextValues Or xlCellTypeConstants) .Value = .Value End With -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... If you want to remove them in place, select the cells and run: Sub tickout() Dim r As Range For Each r In Selection If r.PrefixCharacter = "'" Then r.Value = r.Value End If Next End Sub -- Gary''s Student - gsnu200902 "Sal" wrote: This punctuation mark ' appears before every word in every row of column A. Each row only has one word. I tried removing the punctuation mark ' using the Replace function from the Edit menu. I put replace what: ( ' ) / replace with: (blank), but it didnt work. I also tried other options from the help menu but they didnt work out well either. Is there a code that will remove ' punctuation mark from every cell in column A that has a word written in it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i remove "mark as final" on a spreadsheet? | Excel Discussion (Misc queries) | |||
Excel 2007 - need to mark, not remove, duplicate records. | Excel Discussion (Misc queries) | |||
remove punctuation from address | New Users to Excel | |||
Remove Punctuation? | Excel Worksheet Functions | |||
Remove green mark upper left several cells Excel? | Excel Worksheet Functions |