Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2018, 02:03 PM
rsrasc rsrasc is offline Macro Needed to Move Info from Column A to Column B and C Windows 10 Macro Needed to Move Info from Column A to Column B and C Office 2013
Competent Performer
Macro Needed to Move Info from Column A to Column B and C
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
You're not telling us where your data starts in column A, if there are blank cells in column A, nor if these are the only letters possible.
It's hard to beat an actual spreadsheet for showing typical data and its layout.

That being said, based on what you've illustrated, maybe this...
Code:
Sub MoveData()
Dim cl As Range, ray As Variant
For Each cl In Range("A2", Range("A" & Rows.Count).End(xlUp))
    ray = Split(cl.Value, " ")
    cl.Offset(-1, 1).Value = ray(0)
    cl.Offset(-1, 2).Value = ray(1)
    cl.ClearContents
Next cl
End Sub


Hi NoSparks

The data starts in cell A2 and goes all the way to cell A655. There are no blanks in Column A, and the three letters I mentioned before are the only choices or options available.

The macro is giving me Run-time error "9": Subscripts out of range.

Here is a sample of how the information looks like in Column A starting in A2.

Of course, I changed the names.

JOHN SMITH1
XXX-XX-2953-0 REG-PT
JOHN SMITH2
XXX-XX-0184-0 REG-PT


JOHN SMITH3
XXX-XX-3676-0 REG-FT
JOHN SMITH4
XXX-XX-1956-0 REG-FT
JOHN SMITH5
XXX-XX-0441-0 REG-PT
JOHN SMITH5
XXX-XX-5914-0 REG-PT
JOHN SMITH5
XXX-XX-9658-0 FRS


Hoping this will help!

Thanks again for your support.

rsrasc
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Needed to Move Info from Column A to Column B and C Move Selection to the next Column on a Page (Not a table) GuitarForLife Word VBA 7 02-09-2018 01:59 PM
MSP 2013 - A new column needed a bit like resource names Peasy Project 5 09-18-2014 01:11 PM
Macro Needed to Move Info from Column A to Column B and C Parsing 'FullName' column - help needed text to column ScottA Excel Programming 3 05-06-2014 12:49 PM
Columns. How to move the left column so it's to the right of the 'right' column ? Vit Word 9 11-21-2012 12:57 PM
Fill column with other columns info Novice Excel Programming 10 07-28-2011 09:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft