Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving Cell Information from one workbook into another workbook | Excel Worksheet Functions | |||
moving part of information from one cell to another... | Excel Worksheet Functions | |||
Moving Information | Excel Worksheet Functions | |||
Moving information to a different page | Excel Worksheet Functions | |||
Moving a line of data when information is entered in a specific cell. | Excel Discussion (Misc queries) |