View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Derek Johansen[_2_] Derek Johansen[_2_] is offline
external usenet poster
 
Posts: 41
Default Character Analysis

Hey Guys,

What I would like to do is break down the characters in a cell and analyze
them. The ultimate use for this is going to be because I want to copy all
the characters before the third space in a cell. I tried several things
using things similar to:

Cells(a,b).Characters(Start:=i, Length:=1).Select
character_check = Selection
If character_check = " " then
space_count = space_count + 1

and so on...

The code breaks every time the macro hits the first line in this section.
If i just could figure out how to check each character in a cell, i could do
the rest myself i think. Does anyone have any help on how to look at each
character of the cell and check what it is? Thanks for the help guys!