View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Move Part of Cell String

One more time!

Bob Phillips wrote:

Or maybe now (it changed my clock again LOL).

Bob

"Bob Phillips" wrote in message
...
Hi Gary,

It wasn't the clock, I reset that after a trip to the US, but I forgot to
reset my time zone. Hopefully corrected now.

Thanks

Bob


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
hey bob, is your clock off?

--


Gary


"Bob Phillips" wrote in message
...
Formula ok?

=LEFT(A2,FIND(,",A2)-1)

and

=RIGHT(A2,LEN(A2)-Find(", ",A2)-1)

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"tom" wrote in message
oups.com...
A column has values similar to this:

Austin, TX 45124
San Antonio, TX 45147

My goal is to move the state to the next column over, and the zip to
the column after state.

I can copy the state and zip, but I don't know how to "move", or cut
and paste them.

Here is where I am starting:

Sub moveAddress()

Dim full As String
Dim state As String
Dim zip As String
Dim pos As Long


For Each Cell In Range("e2:e4")
full = Cell.Text
pos = InStr(full, ",")
state = Mid(full, pos, 4)
Cell.Offset(0, 1).Value = state
Next Cell
End Sub


Again, this copies the state, but doesn't move it. I have found many
posts that move the entire contents of a cell, but obviously I can't

do
that.

Thanks

-tom








--

Dave Peterson