moving row info to columns

panda4444

New Member
Joined
May 14, 2003
Messages
23
hey all,

how can I can move all row information in column A to spread out evenly across columns horizontally instead of vertically...
basically I'm trying to fit more information on a page across columns instead of down a row.

thx
 
ok,

in column A I have values that repeat themselves.

For example: A1: bob A2:Bob A3: Bob. A4: Chris A5: Chris.

I have no need for the additional 2 Bob values. So in order to that out I first highlight column A, Click on Data menu, Filter, Advanced filter, and check the "unique records" only box. This action not only filters out the 2 bobs and 1 extra chris value but it logically takes out row A2, A3, A5 which makes sense...


Now, when I run the macro you provided to me to transpose the rows in column A to the other columns.. It will transpose them to columns which is great but the 2 bobs and 1 extra chis are back in the columns and not filtered out. So I tried highlighted the date and filtering out the "special records only" again but nothing happens....

does that help.
BTW: I really appreciate your efforts. !

thx
Panda
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
That's because filtering only "hides" those rows, it doesn't delete them. So those rows are considered when the macro is run.

What we probably need to do is to delete, not hide, the duplicates before we run the macro. I will see what I can come up with.
 
Upvote 0
OK, here is updated code which I think will get rid of the duplicates:

Code:
Sub MovenRows()

    Application.ScreenUpdating = False
    
    Dim MyLastRow As Long
    Dim i, n As Long
    
'   Unique records filter
    MyLastRow = Range("A65536").End(xlUp).Row
    Range("A1:A" & MyLastRow).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
        
'   Delete hidden (filtered) rows
    For i = MyLastRow To 1 Step -1
        If Rows(i).Hidden = True Then
            Rows(i).EntireRow.Delete
        End If
    Next i
    If Cells(2, 1) = Cells(1, 1) Then Rows(2).EntireRow.Delete
       
'   Enter number of rows per page
    n = 37
    
    i = n + 1
    
    Do Until i > Range("A65536").End(xlUp).Row
        Range("A" & i & ":A" & i + n - 1).Select
        Selection.Cut
        Range("IV1").End(xlToLeft).Offset(0, 1).Select
        ActiveSheet.Paste
        i = i + n
    Loop

    Application.ScreenUpdating = False

End Sub
 
Upvote 0
That may have to do with a computer memory issue, not necessarily an Excel issue. You may need to contact your nearest IT guy for that.

The only thing I can recommend trying is to separate the two parts of the macros into two macros and run each separately and see if that makes a difference.
 
Upvote 0

Forum statistics

Threads
1,221,695
Messages
6,161,360
Members
451,699
Latest member
sfairbro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top