Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default for each character in a cell

I need to perform a function for each character in a cell.

I have for each c in activecell.characters
do something
next c

I get "Object does not support this property or method"

Any advice?

Thanks,
Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default for each character in a cell

Hi,
From the XL online documentation on CHaracters:
"Remarks
The Characters object isn't a collection
"
That is, For Each won't work. You have to loop with a regular For:

Dim i as long, ttl as long
Dim s as string
ttl=ActiveCell.Characters.Count
For i=1 to ttl
s= ActiveCell.Characters(i,1).text
NExt

--
Regards,
Sébastien
<http://www.ondemandanalysis.com
<http://www.ready-reports.com


"Kevin" wrote:

I need to perform a function for each character in a cell.

I have for each c in activecell.characters
do something
next c

I get "Object does not support this property or method"

Any advice?

Thanks,
Kevin

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
If cell has any character typed in it cell curser moves to next c Form maker Excel Discussion (Misc queries) 1 December 18th 06 03:15 AM
program cell to display any character when cell is active David is learning Excel Programming 1 January 26th 06 06:58 PM
importing undelimited text file data, character-by-character The Mos$ Excel Programming 4 December 26th 05 11:01 AM
Copy partial cell character format(s) from one cell to another - an example [email protected] Excel Programming 0 May 5th 05 08:23 PM


All times are GMT +1. The time now is 07:17 PM.

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"