Results 1 to 10 of 24

Thread: Move values in rows at the end of the preceding row *SOLVED*

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Junior Member xladept's Avatar
    Join Date
    May 2016
    Posts
    12
    Rep Power
    0
    I think this gets the rogues:

    Code:
    Sub NormanXLFox(): Dim wa As Worksheet, wb As Worksheet, r As Long, B
    Set wb = Sheets("Before"): Set wa = Sheets("After")
    B = wb.UsedRange: wb.UsedRange.AutoFilter 1, "=2018*"
    For r = 2 To Range("A" & Rows.Count).End(xlUp).Row + 1
    If Rows(r).RowHeight = 0 And Rows(r - 1).RowHeight <> 0 And _
    IsNumeric(Left(Range("A" & r), 1)) Then
    Range("A" & r - 1) = Range("A" & r - 1) & "," & Range("A" & r)
    End If: Next r
    wb.UsedRange.Offset(1).SpecialCells(xlCellTypeVisible).Copy _
                wa.Cells(1, 1)
    wa.UsedRange.Replace ",,", ","
    wb.UsedRange.AutoFilter: wb.UsedRange = B
    End Sub
    Last edited by xladept; 01-01-2019 at 02:30 AM.
    You can't do one thing.

    Orrin

Similar Threads

  1. Replies: 8
    Last Post: 09-04-2014, 02:45 AM
  2. vba to move data from a row to a column
    By RobertCordrey in forum Excel Help
    Replies: 3
    Last Post: 03-03-2014, 08:20 AM
  3. Skip empty row and fetch values from other rows
    By dhivya.enjoy in forum Excel Help
    Replies: 1
    Last Post: 11-08-2013, 07:44 PM
  4. Move data from rows into columns for every unique value
    By mahmoud-lee in forum Excel Help
    Replies: 4
    Last Post: 06-13-2013, 03:02 AM
  5. Move or Copy Duplicate Rows to Difference Sheet
    By Vgabond in forum Excel Help
    Replies: 3
    Last Post: 12-08-2012, 12:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •