Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I would like help on my function


Hello,

I will need your assistance. I have in field of Excel an address.
Sometimes in this address, it sometimes happens to have a special
character which is a square. How to remove it and replace it by a
space.

I wish to make a function which starts to seek this character in each
cell of C6 with C65000. It must pass from cell to cell, to check in the
string cell if this character is present and so yes to replace it by a
space but how to do that. I started but I cannot continue

Here my code:

Sub test()
For Each Cell In Worksheets("Feuil1").Range("C6:C65000")
Replace(ActiveCell.Value, Chr$(7), " ")
Next Cell
End Sub


Example in my cell:

10, Bvd of London <- here, i ve a square and after an enter key

Paris


thank you for your assistance

Keawee


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default I would like help on my function

See if this works.

Sub test()
For Each c In Selection 'Worksheets("Feuil1").Range("C6:C65000")
c.Value = Application.Substitute(c, Chr(7), "")
Next c
End Sub

"keawee" wrote in message
...

Hello,

I will need your assistance. I have in field of Excel an address.
Sometimes in this address, it sometimes happens to have a special
character which is a square. How to remove it and replace it by a
space.

I wish to make a function which starts to seek this character in each
cell of C6 with C65000. It must pass from cell to cell, to check in the
string cell if this character is present and so yes to replace it by a
space but how to do that. I started but I cannot continue

Here my code:

Sub test()
For Each Cell In Worksheets("Feuil1").Range("C6:C65000")
Replace(ActiveCell.Value, Chr$(7), " ")
Next Cell
End Sub


Example in my cell:

10, Bvd of London <- here, i ve a square and after an enter key

Paris


thank you for your assistance

Keawee


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



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 Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 11:56 AM.

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

About Us

"It's about Microsoft Excel"