You are a HUGE help! I can't believe I didn't think to use a simple replace
function! I've only been working with
VB Excel for three weeks now, and the
only other experience I have is a Fortran class I took last semester in
school! People like you are really a huge help for me to learn and create
code for my summer work situation! I really really appreciate it!
-----
Is the the most efficient/
"Jacob Skaria" wrote:
Replaced X and spaces inbetween
Sub Macro()
Dim strData As String
strData = Trim(Range("A1")) & Space(3)
strData = Trim(Replace(strData, Split(strData, " ", 4)(3), ""))
strData = Replace(Replace(strData, "X", ""), " ", "")
Range("B1") = strData
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Derek Johansen" wrote:
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!