Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sal Sal is offline
external usenet poster
 
Posts: 84
Default Remove punctuation mark '

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Remove punctuation mark '

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Remove punctuation mark '

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Remove punctuation mark '

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Remove punctuation mark '

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Remove punctuation mark '

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i remove "mark as final" on a spreadsheet? Aliwall Excel Discussion (Misc queries) 1 July 1st 09 05:28 PM
Excel 2007 - need to mark, not remove, duplicate records. DDAI Consult Excel Discussion (Misc queries) 4 August 22nd 07 07:50 PM
remove punctuation from address Mary New Users to Excel 3 August 29th 06 01:53 PM
Remove Punctuation? kcoakley Excel Worksheet Functions 6 June 2nd 06 04:46 AM
Remove green mark upper left several cells Excel? George Excel Worksheet Functions 1 March 31st 06 06:12 PM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"