Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
j j is offline
external usenet poster
 
Posts: 128
Default moving Imported information

I am trying to create a Trust Account spreadsheet and I am importing records
from a sale management application. When the info comes in it fills all the
necessary columns on my spreadsheet however, because this information varies
in length each time (more or less records depending on the activity of the
import) I have to identify each range and then move that range into the
proper column.

Example:

move range I2 thru M2 to D2
move range N2 thru R2 to D3
move range S2 thru W2 to D4

and so on, but remember the number of ranges can be more or less so the
command needs to be able to recognize the end of those particular records.
That way it doesn't move any other ones. (I hope this makes sense)

If anyone can help I would appreciate it. Thanks, J
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default moving Imported information

You need a macro

Sub move_data()

FirstCol = Range("I1").Column
RowCount = 1
Do While Range("A" & RowCount) < ""
ColCount = FirstCol
OldRow = RowCount
Do While Cells(OldRow, ColCount) < ""
RowCount = RowCount + 1
Rows(RowCount).Insert
Range(Cells(OldRow, ColCount), Cells(OldRow, ColCount + 4)).Cut _
Destination:=Range("D" & RowCount)
ColCount = ColCount + 5
Loop
RowCount = RowCount + 1
Loop
End Sub


"J" wrote:

I am trying to create a Trust Account spreadsheet and I am importing records
from a sale management application. When the info comes in it fills all the
necessary columns on my spreadsheet however, because this information varies
in length each time (more or less records depending on the activity of the
import) I have to identify each range and then move that range into the
proper column.

Example:

move range I2 thru M2 to D2
move range N2 thru R2 to D3
move range S2 thru W2 to D4

and so on, but remember the number of ranges can be more or less so the
command needs to be able to recognize the end of those particular records.
That way it doesn't move any other ones. (I hope this makes sense)

If anyone can help I would appreciate it. Thanks, J

Reply
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
Moving Cell Information from one workbook into another workbook [email protected] Excel Worksheet Functions 2 January 25th 07 02:26 AM
moving part of information from one cell to another... auntwanette Excel Worksheet Functions 1 November 15th 06 10:07 PM
Moving Information Anupkumar Excel Worksheet Functions 7 June 22nd 06 03:44 AM
Moving information to a different page Andy Excel Worksheet Functions 2 June 5th 06 08:19 PM
Moving a line of data when information is entered in a specific cell. opshmo Excel Discussion (Misc queries) 2 October 6th 05 06:08 PM


All times are GMT +1. The time now is 01:52 AM.

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

About Us

"It's about Microsoft Excel"