Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I wish to copy 2 columns of numbers as follows:
A B 1 100 2 50 3 85 4 5 6 10 7 15 9 10 10 20 20 11 16 The PASTED TO cells will appear as follows: A B 1 100 85 2 50 10 3 15 10 4 20 20 5 16 In other words, all occupied cells are filled in from top to bottom, skipping all blanks. How is this accomplished? Thanks, FLKulchar |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Public Sub ProcessData()
Dim i As Long, j As Long Dim LastRow As Long With ActiveSheet For j = 1 To 2 LastRow = .Cells(.Rows.Count, j).End(xlUp).Row For i = LastRow To 2 Step -1 If .Cells(i - 1, j).Value = "" Then .Cells(i - 1, j).Value = .Cells(i, j).Value .Cells(i - 1, j).Delete shift:=xlUp End If Next i Next j End With End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "F. Lawrence Kulchar" wrote in message ... I wish to copy 2 columns of numbers as follows: A B 1 100 2 50 3 85 4 5 6 10 7 15 9 10 10 20 20 11 16 The PASTED TO cells will appear as follows: A B 1 100 85 2 50 10 3 15 10 4 20 20 5 16 In other words, all occupied cells are filled in from top to bottom, skipping all blanks. How is this accomplished? Thanks, FLKulchar |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A rough and ready way would be to highlight columns A and B down to
the bottom-most value, then click on Edit | GoTo (or press F5), then click Special and click on Blanks then OK. Then Edit | Delete... | Shift cells up | OK. Hope this helps. Pete On Mar 7, 7:56*am, F. Lawrence Kulchar wrote: I wish to copy 2 columns of numbers as follows: * * * * *A * * * * * * * * * * * * * B 1 * * *100 * * * * * * * * * * * * * * * * * * 2 * * * 50 * * * * * * * * * * * * * * * 3 * * * * * * * * * * * * * * * * * *85 4 * * * * * * * * * * * * * * * * * * * * * 5 * * * * * * * * * * * * * * * * * * * * * * * 6 * * * * * * * * * * * * * * * * * * *10 7 * * * *15 * * * * * * * * * * * * * * * * 9 * * * * * * * * * * * * * * * * * * *10 10 * * 20 * * * * * * * * * * * * * *20 11 * * * * * * * * * * * * * * * * * * 16 The PASTED TO cells will appear as follows: * * * * * *A * * * * * * * * * * * * *B *1 * * * 100 * * * * * * * * * * * *85 *2 * * * * 50 * * * * * * * * * * * * 10 *3 * * * *15 * * * * * * * * * * * * 10 *4 * * * * 20 * * * * * * * * * * * *20 *5 * * * * * * * * * * * * * * * * * *16 In other words, all occupied cells are filled in from top to bottom, skipping all blanks. How is this accomplished? Thanks, FLKulchar |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I thought of this..however, in comes another problem...my blank cells are
not "blank" at all...there exists a formula where the value is "", ergo...NOT 'blank' per se. I performed a space special wherein I pasted values ONLY, but to no avail... Any more suggestions, please?? Thanks, FLKulchar "Pete_UK" wrote in message ... A rough and ready way would be to highlight columns A and B down to the bottom-most value, then click on Edit | GoTo (or press F5), then click Special and click on Blanks then OK. Then Edit | Delete... | Shift cells up | OK. Hope this helps. Pete On Mar 7, 7:56 am, F. Lawrence Kulchar wrote: I wish to copy 2 columns of numbers as follows: A B 1 100 2 50 3 85 4 5 6 10 7 15 9 10 10 20 20 11 16 The PASTED TO cells will appear as follows: A B 1 100 85 2 50 10 3 15 10 4 20 20 5 16 In other words, all occupied cells are filled in from top to bottom, skipping all blanks. How is this accomplished? Thanks, FLKulchar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Skipping Blanks | Excel Discussion (Misc queries) | |||
copy a list and skipping blanks | Excel Worksheet Functions | |||
Skipping a cell and moving on to the next, with no blanks in betwe | Excel Discussion (Misc queries) | |||
Skipping blanks | Excel Discussion (Misc queries) | |||
Paste Special Skip Blanks not skipping blanks, but overwriting... | Excel Discussion (Misc queries) |