#1   Report Post  
Posted to microsoft.public.excel.misc
gwc gwc is offline
external usenet poster
 
Posts: 62
Default Move cells up

How can I move the cells beginning with "0000000", "028", and "0PAID STATUS" onto the same row as the preceding cell beginning with "0ASMNT-NBR"? (Note: the number of cells beginning with "028" varies).

0ASMNT-NBR 050607227-9
0000000
0PAID STATUS
0ASMNT-NBR 050607489-9
0000000
0PAID STATUS
0ASMNT-NBR 050607522-5
0000000
0PAID STATUS
0ASMNT-NBR 050607657-4
0000000
0PAID STATUS
0ASMNT-NBR 050607749-4
0000000
0PAID STATUS
0ASMNT-NBR 050607801-7
0000000
0PAID STATUS
0ASMNT-NBR 050607842-4
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050608520-6
0000000
0285275
0PAID STATUS
0ASMNT-NBR 050608546-0
0000000
0PAID STATUS
0ASMNT-NBR 050608547-1
0000000
0PAID STATUS
0ASMNT-NBR 050608548-2
0000000
0PAID STATUS
0ASMNT-NBR 050608555-8
0000000
0PAID STATUS
0ASMNT-NBR 050608605-0
0000000
0PAID STATUS
0ASMNT-NBR 050608618-2
0000000
0PAID STATUS
0ASMNT-NBR 050608706-8
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050608739-8
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050608750-7
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050608757-4
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050608762-8
0000000
02844831
0PAID STATUS
0ASMNT-NBR 050609462-0
0000000
0285291
0PAID STATUS
0ASMNT-NBR 050609482-8
0000000
0PAID STATUS
0ASMNT-NBR 050609658-1
0000000
0PAID STATUS
0ASMNT-NBR 050609754-4
0000000
0PAID STATUS
0ASMNT-NBR 050610381-4
0000000
0PAID STATUS
0ASMNT-NBR 050610456-9
0000000
0PAID STATUS
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Move cells up

Hi,

Am Mon, 12 Nov 2012 12:09:07 -0800 (PST) schrieb gwc:

How can I move the cells beginning with "0000000", "028", and "0PAID STATUS" onto the same row as the preceding cell beginning with "0ASMNT-NBR"? (Note: the number of cells beginning with "028" varies).


try:

Sub Transpose()
Dim rngC As Range
Dim Start As Long
Dim i As Integer
Dim LRow As Long

Application.ScreenUpdating = False
LRow = Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In Range("A1:A" & LRow)
If InStr(rngC, "0ASM") = 1 Then
Start = rngC.Row
i = 1
End If
If InStr(rngC, "0ASM") = 0 Then
i = i + 1
Cells(Start, i) = rngC
End If
Next
For i = LRow To 2 Step -1
If Cells(i, 2) = "" Then
Cells(i, 2).EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.misc
gwc gwc is offline
external usenet poster
 
Posts: 62
Default Move cells up

Thank you !!!!!!!!!
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 0 March 31st 10 10:34 PM
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 04:57 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"