Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have gropus of data that are imported.
Heading Phone # Part Name & # etc etc Heading Phone # Part Name & # etc etc Heading Phone # Part Name & # etc etc Pattern continues for over 100 pages. Now I want the cell "Part Name & #" to be selected and moved up to an empty cell to the right of the cell "Heading". What from a code standpoint would that look like in Visual Basic within a macro? I want ALL of the groupings done in this way. They are all imported in the same patterns, so if there is some way to select all cells with "Part Name & #" have them move up two spaces and over 5 or 6 cells then paste, that would work. Make sense??? THANKS!!!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If I understand your question correctly, this should work. Set the range as required. Regards. Sub Test() Dim x As Variant Dim y As Variant For Each c In Range("A1:A20") If c.Value = "Heading" Then x = c.Cells.Row y = c.Cells.Column Cells(x, y + 1) = Cells(x + 2, y) End If Next End Sub "bodhisatvaofboogie" wrote: I have gropus of data that are imported. Heading Phone # Part Name & # etc etc Heading Phone # Part Name & # etc etc Heading Phone # Part Name & # etc etc Pattern continues for over 100 pages. Now I want the cell "Part Name & #" to be selected and moved up to an empty cell to the right of the cell "Heading". What from a code standpoint would that look like in Visual Basic within a macro? I want ALL of the groupings done in this way. They are all imported in the same patterns, so if there is some way to select all cells with "Part Name & #" have them move up two spaces and over 5 or 6 cells then paste, that would work. Make sense??? THANKS!!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I move this data? | New Users to Excel | |||
Move data | Excel Worksheet Functions | |||
Macro to move data to different column based on data in another co | Excel Discussion (Misc queries) | |||
enter data in cell which will start macro to move data to sheet2 | Excel Discussion (Misc queries) | |||
create macro to move label type data to column data | Excel Programming |