Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default 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
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
Search for empty cells and move cells next to KP[_4_] Excel Programming 10 September 21st 11 08:44 PM
Move cells down to match cells gcotterl[_2_] Excel Programming 3 April 1st 10 06:54 PM
Move cells down to match cells gcotterl[_2_] Excel Programming 1 April 1st 10 01:09 AM
Can references (to cells being sorted) move with the cells? Zack Setting up and Configuration of Excel 1 January 16th 08 01:50 PM
Sorting cells: a list behind the cells do not move with the cell Ross M Excel Discussion (Misc queries) 2 September 21st 06 12:14 PM


All times are GMT +1. The time now is 06:05 PM.

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"