LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Move Part of Cell String

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

 
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
Search/Match/Find ANY part of string to ANY part of Cell Value TWhizTom Excel Worksheet Functions 0 July 21st 08 08:16 PM
Move part of cell only - help please Jude Excel Discussion (Misc queries) 5 March 25th 08 01:01 AM
removing part of text string to another cell jamie_k Excel Discussion (Misc queries) 2 July 24th 06 10:57 AM
select part of a cell value string rich_j_h Excel Discussion (Misc queries) 2 May 19th 05 11:36 AM
move part of cell to new column S.E. Excel Programming 5 May 3rd 05 04:34 PM


All times are GMT +1. The time now is 07:03 AM.

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

About Us

"It's about Microsoft Excel"