SnowboardBruin
SnowboardBruin

Reputation: 3685

I need to move every other row up in Excel

I have a table of information, but each item is across 2 rows.

So what should be 1 line-item is in A1 and A2, A3 and A4, A5 and A6, etc.

How can I move

etc?

Thanks so much...Every time you help me you save a kitten!

Upvotes: 1

Views: 4870

Answers (2)

David
David

Reputation: 1

You can automate deleting the spare rows too, I have a similar function like this:

Dim r As Range, rows As Long, i As Long

Set r = ActiveSheet.Range("whatever your range is")
rows = r.rows.Count
For i = rows To 1 Step (-1)
    If WorksheetFunction.CountA(r.rows(i)) = 0 Then r.rows(i).EntireRow.Delete
    Next

Upvotes: 0

Tim Williams
Tim Williams

Reputation: 166755

In B1:

=IF(MOD(ROW(),2)=1,A2,"")

Fill down, copy--> paste values and sort on ColB to bring the data together. Delete the "spare" rows.

Upvotes: 2

Related Questions