Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 124
Default Skipping Blanks (Again)

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Skipping Blanks (Again)

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Skipping Blanks (Again)

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Skipping Blanks (Again)

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
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
Skipping Blanks F. Lawrence Kulchar Excel Discussion (Misc queries) 1 March 7th 08 11:27 AM
copy a list and skipping blanks Art Excel Worksheet Functions 20 November 29th 06 03:21 PM
Skipping a cell and moving on to the next, with no blanks in betwe SteveC Excel Discussion (Misc queries) 8 May 18th 06 09:36 AM
Skipping blanks jmkona Excel Discussion (Misc queries) 2 August 27th 05 01:12 AM
Paste Special Skip Blanks not skipping blanks, but overwriting... gsrosin Excel Discussion (Misc queries) 0 February 22nd 05 03:33 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"