Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Delete Asc(10) character from cell

I have cells with Asc(10) characters in them, however when I press the
Delete key or Clear Contents or make the cell = "" the character still
remains in the cell. How can I rid myself of the character using code? I
can get rid of it manually by selecting the cell, clicking in the formula
bar and back spacing.
Any ideas would be appreciated, thanks.

--
Regards,
Rocky McKinley



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Delete Asc(10) character from cell

Hi
maybe something like
range("A1").value=Replace(range("A1").value, chr(10),"")

--
Regards
Frank Kabel
Frankfurt, Germany


Rocky McKinley wrote:
I have cells with Asc(10) characters in them, however when I press

the
Delete key or Clear Contents or make the cell = "" the character

still
remains in the cell. How can I rid myself of the character using
code? I can get rid of it manually by selecting the cell, clicking
in the formula bar and back spacing.
Any ideas would be appreciated, thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Delete Asc(10) character from cell

Unfortunatley that didn't work, thanks for the try though.

--
Regards,
Rocky McKinley


"Frank Kabel" wrote in message
...
Hi
maybe something like
range("A1").value=Replace(range("A1").value, chr(10),"")

--
Regards
Frank Kabel
Frankfurt, Germany


Rocky McKinley wrote:
I have cells with Asc(10) characters in them, however when I press

the
Delete key or Clear Contents or make the cell = "" the character

still
remains in the cell. How can I rid myself of the character using
code? I can get rid of it manually by selecting the cell, clicking
in the formula bar and back spacing.
Any ideas would be appreciated, thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Delete Asc(10) character from cell

Rocky

How do you know the character is asc(10)?

Maybe asc(13) or some other.

Check out Chip Pearson's Cellview add-in to see what you have in the cell(s)

http://www.cpearson.com/excel/CellView.htm

Gord Dibben Excel MVP

On Fri, 11 Jun 2004 16:04:32 -0700, "Rocky McKinley"
wrote:

Unfortunatley that didn't work, thanks for the try though.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Delete Asc(10) character from cell

I used the code below to check the cell in question and the message box came
up with 10 as the only answer.

Sub CheckCellValue()
Dim a as Integer
For a = 1 To 255
If Chr(a) = Range("AE16").Text Then MsgBox a
Next a
End Sub

I'll check out Chip's page as you suggested, thanks.
--
Regards,
Rocky McKinley


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Rocky

How do you know the character is asc(10)?

Maybe asc(13) or some other.

Check out Chip Pearson's Cellview add-in to see what you have in the

cell(s)

http://www.cpearson.com/excel/CellView.htm

Gord Dibben Excel MVP

On Fri, 11 Jun 2004 16:04:32 -0700, "Rocky McKinley"
wrote:

Unfortunatley that didn't work, thanks for the try though.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Delete Asc(10) character from cell

Chips Add-In comfirms as my code below did that the Decimal character is
010. It really doesn't matter what character it is as long as I can get rid
of it, that is the main problem. I'm sure someone must have ran into this
one before!

Any help is still appreciated.

--
Regards,
Rocky McKinley


"Rocky McKinley" wrote in message
...
I used the code below to check the cell in question and the message box

came
up with 10 as the only answer.

Sub CheckCellValue()
Dim a as Integer
For a = 1 To 255
If Chr(a) = Range("AE16").Text Then MsgBox a
Next a
End Sub

I'll check out Chip's page as you suggested, thanks.
--
Regards,
Rocky McKinley


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Rocky

How do you know the character is asc(10)?

Maybe asc(13) or some other.

Check out Chip Pearson's Cellview add-in to see what you have in the

cell(s)

http://www.cpearson.com/excel/CellView.htm

Gord Dibben Excel MVP

On Fri, 11 Jun 2004 16:04:32 -0700, "Rocky McKinley"
wrote:

Unfortunatley that didn't work, thanks for the try though.






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Delete Asc(10) character from cell

Problem solved thanks for all the help.

--
Regards,
Rocky McKinley


"Rocky McKinley" wrote in message
...
Chips Add-In comfirms as my code below did that the Decimal character is
010. It really doesn't matter what character it is as long as I can get

rid
of it, that is the main problem. I'm sure someone must have ran into this
one before!

Any help is still appreciated.

--
Regards,
Rocky McKinley


"Rocky McKinley" wrote in message
...
I used the code below to check the cell in question and the message box

came
up with 10 as the only answer.

Sub CheckCellValue()
Dim a as Integer
For a = 1 To 255
If Chr(a) = Range("AE16").Text Then MsgBox a
Next a
End Sub

I'll check out Chip's page as you suggested, thanks.
--
Regards,
Rocky McKinley


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Rocky

How do you know the character is asc(10)?

Maybe asc(13) or some other.

Check out Chip Pearson's Cellview add-in to see what you have in the

cell(s)

http://www.cpearson.com/excel/CellView.htm

Gord Dibben Excel MVP

On Fri, 11 Jun 2004 16:04:32 -0700, "Rocky McKinley"
wrote:

Unfortunatley that didn't work, thanks for the try though.







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Delete Asc(10) character from cell

ActiveCell.Clearcontents

does exactly that - Asc(10) is not ignored.

You probably didn't apply it to the cell in question.

--
Regards,
Tom Ogilvy


"Rocky McKinley" wrote in message
...
Problem solved thanks for all the help.

--
Regards,
Rocky McKinley


"Rocky McKinley" wrote in message
...
Chips Add-In comfirms as my code below did that the Decimal character is
010. It really doesn't matter what character it is as long as I can get

rid
of it, that is the main problem. I'm sure someone must have ran into

this
one before!

Any help is still appreciated.

--
Regards,
Rocky McKinley


"Rocky McKinley" wrote in message
...
I used the code below to check the cell in question and the message

box
came
up with 10 as the only answer.

Sub CheckCellValue()
Dim a as Integer
For a = 1 To 255
If Chr(a) = Range("AE16").Text Then MsgBox a
Next a
End Sub

I'll check out Chip's page as you suggested, thanks.
--
Regards,
Rocky McKinley


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Rocky

How do you know the character is asc(10)?

Maybe asc(13) or some other.

Check out Chip Pearson's Cellview add-in to see what you have in the
cell(s)

http://www.cpearson.com/excel/CellView.htm

Gord Dibben Excel MVP

On Fri, 11 Jun 2004 16:04:32 -0700, "Rocky McKinley"
wrote:

Unfortunatley that didn't work, thanks for the try though.









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
Excel 2007 - Formatting text in cell (character by character) TomC Excel Discussion (Misc queries) 0 January 29th 10 07:25 PM
TO DELETE ONLY NUMERIC VALUES IN A CHARACTER AND NUMERIC CELL IN ramesh k. goyal - abohar[_2_] Excel Discussion (Misc queries) 1 October 28th 09 06:50 AM
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
how to select the first character in a cell and delete the rest Helenf Excel Worksheet Functions 4 May 14th 09 12:10 PM
Delete special character Kiannie Excel Discussion (Misc queries) 3 April 2nd 09 11:24 PM


All times are GMT +1. The time now is 02:14 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"