Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cells down
My spreadsheet has:
G T 001504798-2 001504798-2 xoxoxox 001511777-5 001511777-5 485505 001511905-4 001511905-4 48304550 001512678-2 001512678-2 yyyyyyy 001512678-2 001512697-9 zzzzzz 001512678-2 001513196-6 001512678-2 001513504-1 dododod 001512678-2 001513842-6 001512697-9 001514491-5 $$%^& 001512697-9 001514725-7 001512697-9 001515239-8 001512697-9 001513196-6 001513504-1 001513504-1 001513504-1 001513842-6 001514491-5 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 001515312-0 Note: The cells in T may have more than 11 characters but I want to match on the 11 leftmost characters. How can I move the cells in COL T down until they are on the same row as the matching cells in COL G so the result is: G T 001504798-2 001504798-2 xoxoxox 001511777-5 001511777-5 485505 001511905-4 001511905-4 48304550 001512678-2 001512678-2 yyyyyyy 001512678-2 001512678-2 001512678-2 001512678-2 001512697-9 001512697-9 zzzzzz 001512697-9 001512697-9 001512697-9 001513196-6 001513196-6 001513504-1 001513504-1 dododod 001513504-1 001513504-1 001513842-6 001513842-6 001514491-5 001514491-5 $$%^& 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cells down
On Wed, 30 Nov 2011 10:55:20 -0800 (PST), gary wrote:
My spreadsheet has: G T 001504798-2 001504798-2 xoxoxox 001511777-5 001511777-5 485505 001511905-4 001511905-4 48304550 001512678-2 001512678-2 yyyyyyy 001512678-2 001512697-9 zzzzzz 001512678-2 001513196-6 001512678-2 001513504-1 dododod 001512678-2 001513842-6 001512697-9 001514491-5 $$%^& 001512697-9 001514725-7 001512697-9 001515239-8 001512697-9 001513196-6 001513504-1 001513504-1 001513504-1 001513842-6 001514491-5 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 001515312-0 Note: The cells in T may have more than 11 characters but I want to match on the 11 leftmost characters. How can I move the cells in COL T down until they are on the same row as the matching cells in COL G so the result is: G T 001504798-2 001504798-2 xoxoxox 001511777-5 001511777-5 485505 001511905-4 001511905-4 48304550 001512678-2 001512678-2 yyyyyyy 001512678-2 001512678-2 001512678-2 001512678-2 001512697-9 001512697-9 zzzzzz 001512697-9 001512697-9 001512697-9 001513196-6 001513196-6 001513504-1 001513504-1 dododod 001513504-1 001513504-1 001513842-6 001513842-6 001514491-5 001514491-5 $$%^& 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 Is it the case that column T may contain either one or two substrings? Or is the third apparent column of strings in a separate column? Is it the case that you do NOT want columns H:S altered? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cells down
I answered this in another forum VERY recently
Sub moveemdowntomatchSAS() Dim i As Long For i = 2 To Cells(Rows.Count, "a").End(xlUp).Row If Left(Cells(i, "a"), 11) < Left(Cells(i, "b"), 11) Then Cells(i, "b").Resize(, 2).Insert End If Next i End Sub On Nov 30, 12:55*pm, gary wrote: My spreadsheet has: * * * * *G * * * * * * * * * * * * * *T 001504798-2 *001504798-2 *xoxoxox 001511777-5 *001511777-5 *485505 001511905-4 *001511905-4 *48304550 001512678-2 *001512678-2 *yyyyyyy 001512678-2 *001512697-9 *zzzzzz 001512678-2 *001513196-6 001512678-2 *001513504-1 *dododod 001512678-2 *001513842-6 001512697-9 *001514491-5 *$$%^& 001512697-9 *001514725-7 001512697-9 *001515239-8 001512697-9 001513196-6 001513504-1 001513504-1 001513504-1 001513842-6 001514491-5 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 001515312-0 Note: The cells in T may have more than 11 characters but I want to match on the 11 leftmost characters. How can I move the cells in COL T down until they are on the same row as the matching cells in COL G so the result is: * * * * * G * * * * * * * * * * * * T 001504798-2 *001504798-2 *xoxoxox 001511777-5 *001511777-5 *485505 001511905-4 *001511905-4 *48304550 001512678-2 *001512678-2 *yyyyyyy 001512678-2 001512678-2 001512678-2 001512678-2 001512697-9 *001512697-9 *zzzzzz 001512697-9 001512697-9 001512697-9 001513196-6 *001513196-6 001513504-1 *001513504-1 *dododod 001513504-1 001513504-1 001513842-6 *001513842-6 001514491-5 *001514491-5 *$$%^& 001514491-5 001514491-5 001514491-5 001514491-5 001514725-7 *001514725-7 001514725-7 001514725-7 001514725-7 001514725-7 001515239-8 *001515239-8 001515239-8 001515239-8 001515239-8 001515239-8 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search for empty cells and move cells next to | Excel Programming | |||
Move cells down to match cells | Excel Programming | |||
Move cells down to match cells | Excel Programming | |||
Can references (to cells being sorted) move with the cells? | Setting up and Configuration of Excel | |||
Sorting cells: a list behind the cells do not move with the cell | Excel Discussion (Misc queries) |