LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default automaticaly moving information

Rick: I think you have to insert rows otherwise you are going to overwrite
data in next row. I posted this solution in a newer posting.

"Rick Rothstein (MVP - VB)" wrote:

If Joel's guess if wrong, then for the example you posted, this macro will
move the row of data to the column you specified...

Sub MoveRow2Data()
Dim X As Long, Z As Long
Dim LastColumn As Long
Const StartCol As Long = 9
Const GroupCount As Long = 5
Const MoveToColumn As Long = 4
Const DataRow As Long = 2
With Worksheets("Sheet1")
LastColumn = .Cells(DataRow, .Columns.Count).End(xlToLeft).Column
For X = StartCol To LastColumn Step 5
For Z = 0 To GroupCount - 1
.Cells(DataRow, X + Z).Copy _
Destination:=.Cells(X - 9 + DataRow + Z, MoveToColumn)
Next
Next
.Cells(DataRow, StartCol).Resize(1, LastColumn - _
StartCol + 1).ClearContents
End With
End Sub

Rick


"J" wrote in message
...
I am importing CSV records from a sales management application and the
information, when imported, hits the sheet in the columns and each range
needs to be moved into the correct columns. (This imported information is
of
a different size each time it is imported. )

Also, there will be several ranges of records that will have to be moved
under the same identified column.

Example:

move I2 thru M2 to D2
move N2 thru R2 to D3
move S2 thru W2 to D4 (and so on until it finds the last record with the
same import code)

I have identified the columns that this information needs to be moved
into,
however I do not know the formula or code to tell it to do this?

Can anyone help me? Thanks, J.




 
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
How do I put in information without the page moving Dave Excel Discussion (Misc queries) 1 December 29th 09 05:03 PM
moving Imported information J Excel Discussion (Misc queries) 1 April 9th 08 07:35 PM
Moving Data Automaticaly JohnM New Users to Excel 3 November 25th 07 08:23 PM
Moving Information Anupkumar Excel Worksheet Functions 7 June 22nd 06 03:44 AM
how do i can send a information of cell automaticaly via email? Rajani New Users to Excel 1 June 8th 06 10:59 PM


All times are GMT +1. The time now is 10:43 PM.

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"